| 04-19-2004, 04:57 PM | #1 |
"Yes, and what I posted is a link to what it does and how it works. For a simple explanation: it compares a string generated by a unit (don't know what unit, since I don't know what unit has string "1315791214") and a music file path. If it is 0, which it will be, since the music file was imported with winmpq and will be deleted in the next save, it will defeat everyone." Ok, there is no link I don't want a simple explination, i want to know _HOW TO DO IT_ so i can use it in my own map!!!!!!! Now please, if anyone knows how to impliment a darky27 protection method (see magic in jass thread now locked) tell me... Code:
function MapInitialisation takes nothing returns nothing
set bj_lastPlayedMusic = SubStringBJ(UnitId2StringBJ(1315791214), 1, 2) + "p"
set bj_changeLevelMapName = SubStringBJ(UnitId2StringBJ(1853060204), 10, 16)
set bj_forLoopBIndex = GetSoundFileDuration(UnitId2StringBJ(1966092338) + "\\" + ( StringIdentity("TRIGSTR_006") + ".wav" ))
if ( bj_forLoopBIndex == 0 ) then
loop
exitwhen bj_forLoopBIndex > 11
call CustomDefeatBJ( Player(bj_forLoopBIndex), ( bj_lastPlayedMusic + bj_changeLevelMapName ) )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endif
endfunction
//Darky27 = TRIGSTR_006boils down to.. Code:
function MapInitialisation takes nothing returns nothing
set bj_forLoopBIndex = GetSoundFileDuration(UnitId2StringBJ(1966092338) + "\\" + ( StringIdentity("TRIGSTR_006") + ".wav" ))
if ( bj_forLoopBIndex == 0 ) then
loop
exitwhen bj_forLoopBIndex > 11
call CustomDefeatBJ( Player(bj_forLoopBIndex), ( bj_lastPlayedMusic + bj_changeLevelMapName ) )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endif
endfunction
//Darky27 = TRIGSTR_006
i think he put a wave file in his map via an mpq editor [after saving in the world editor] then from now on when its saved in the world editor, the world editor deletes the wave file becase -- ? why ? -- it deletes the wave file thus returning the value of zero (bc since its not there u cant get its path) and that activates the trigger so HOw do I put this in my map?! !!!!! how can i make a wave file that will delete upon map save?? |
| 04-20-2004, 06:59 PM | #2 |
comeon you smart people :D everyone knew the answer when they thought i was trying to do something naughty but now when i just want to use it in my map no one knows.. funny huh? ^_^ |
| 04-20-2004, 11:06 PM | #3 |
Do you really think that bumping your thread will make people more eager to answer your question? Have you actually tried figuring it out on your own? Like read about how storing things in the map file works. And tried to learn what the Jass code that is involved actually does? People is normally more helpful if you show that you have tried on your own... |
| 04-21-2004, 02:09 AM | #4 | |
Quote:
The gist of it is, when you change stuff about the map not with the world editor the world editor doesnt know and when you save in the world editor it recompiles all the files and it can only compile the known files. that wave wasent added via the world editor so when you click save its not included and thus it triggers the jass code. i'm asking how to impliment such a protection method in my map, dont be a smart ass. |
| 04-21-2004, 10:34 AM | #5 |
Dude, PEON, i've seen you be really rude alot of the time with people who try to help you. Guess why noone answers your questions directly...both becouse you start bumping them within a few hours in a forum that doesn't even get more than 3-4 new threads per day, and some people actually don't read these forums 24/7....and that you're sometimes rude when someone tries to help and if they don't get the question or sumtin. So please try to be be kinder. The thing is...you already explained how to implement such a projection method into your map.......Why are you asking this. ...You import a sound into your map with a MPQ editor like WinMPQ...as you said... you write into your code that if the duration of this imported sound is equal to "0". You kick all the players...THAT'S IT! UnitId2StringBJ(1966092338) + "\\" + ( StringIdentity("TRIGSTR_006") + ".wav" ) All this stuff is completely optional, that's just to confuse the reader, to make it harder to figure out the directory. You can just as well do the following: if(GetSoundFileDuration("Units\\MySound.wav") == 0) then *kick all players* endif It's up to you if you want to do something like Darky does to make the directory harder to figure, but remember that it's just as easy/hard to just remove this check than to find out the correct directory and import to it. Cubasis |
| 04-21-2004, 03:31 PM | #6 | |
Quote:
omg thank you!!!!!! ^_^ y was this so difficult?! :\ |
