| 08-14-2003, 08:55 AM | #1 |
I'm creating a trigger-assisted spell, and want to loop an effect repeatdly at a location. But it seems when add a WAIT command such as WAIT for 0.20 seconds in the FOR INTEGER A loop, it cancels the rest of the loop, and even some actions in the rest of the trigger. Anyone know what I'm talking about? I'm sure many of you may have hit this problem before. any help is appreciated -enfo |
| 08-14-2003, 09:22 AM | #2 |
I haven't noticed this...made up a test map to check it out an' it worked fine...(the only trigger in the map) TheLoop Events Player - Player 1 (Red) types a chat message containing 1 as An exact match Conditions Actions For each (Integer A) from 1 to 1555, do (Actions) Loop - Actions Game - Display to (All players) the text: (First: + (String((Integer A)))) Wait 1.00 seconds Game - Display to (All players) the text: (Second: + (String((Integer A)))) |
| 08-14-2003, 09:38 AM | #3 |
I narrowed down my problem. My trigger's event is : Unit- Unit finishes casting an ability And the Action trigger uses the function: Player number of (Owner of casting Unit) in it's variables. The moment I put in a WAIT FOR XX SECONDS, whether or not it is in a loop, my theory is that (Owner of casting Unit) is reset. All my actions that use (owner of casting unit) are reset after I put in a Wait of any kind. anyone know a solution? -enfo |
| 08-14-2003, 01:57 PM | #4 |
Put the Owner of casting Unit in a variable before your wait. |
| 08-14-2003, 02:35 PM | #5 |
Problem with that is there is an unknown amount of heros using that spell. If I put that in a variable, and another user casts the same spell, the name will be overwritten. |
| 08-14-2003, 04:46 PM | #6 |
No the variable will be local for that trigger like the owner of casting unit. Try it. |
| 08-14-2003, 05:30 PM | #7 | |
Quote:
Actually, it won't. There's a bug with Wait at the moment, some event responses (such as Casting Unit) get lost when you do a wait command. Once they fix it, this will be the correct way to use it, though. |
| 08-14-2003, 08:11 PM | #8 |
Yeah I just tried it. Doesn't work. Now I know why all the maps with nice custom spells like DoTA and ToB only allow one hero of each type =( |
| 08-15-2003, 09:01 AM | #9 |
Oh that's bad! :( |
| 08-15-2003, 09:54 AM | #10 |
I had a similar problem with this bug in my map. But since the units effected where only one for each player I just added them to a unit array with the array number as the owner of the casting unit, i.e. Set variable "TempUnits(Player Number)" = Casting Unit Then I just used the TempUnits unit in the rest of the trigger. |
| 08-15-2003, 02:42 PM | #11 |
Yeah, I have a similar unit array set up for the Player heros. But my problem is the index. To refer to that array I have to do PlayerUnits[PlayerIndex(Owner of (casting unit)], and it's the casting unit function that is getting messed up. So I'm back at the drawing board.... What is really bizarre is that I saved the Player number of the casting unit to a variable, and the WAIT FOR seemed to mess up that variable even though it was set before the WAIT FOR. Frightening. |
| 08-15-2003, 02:53 PM | #12 |
You could try going into custom script and creating a local variable |
| 08-15-2003, 04:26 PM | #13 |
Well enfo, could you just post your original trigger(copy as text)? You can change all variables in it so that we'll not know what you really want... But by the talking, I still can't understand what your problem is... so could you show us? |
| 11-18-2004, 03:47 AM | #14 |
Guest | 1st of all i would like to know 1 thing, if this is the enfo who created the whole ETS maps. if it is y did u remove enfo, every1 nos he is the best character with grake? anyway, hav u tried making 2/3/4/5/6.... triggers which hav different variables, eg in one its variable is 1, in another its variable is 2 units, another = 3 units... the only problem i can see with this is that u would have to put the casting time up so that both the casters didnt hav 2 cast the spell at the EXACT same time. personally i dont know if this would work. im not at home so i cant try it. if this doesnt work u cood try, this might sound stupid and i hav no idea if this would even be close to working, making the spell so it could be spelljacked by spellbreakers and hav it ALSO cast watever spell u want it to cast, and also make a new ability under the circumstances that it has just stolen this spell as a lvl2 version of this spell and then have the spellthief cast that spell but still hav the orginal channeling sumhow. its hard to get a hang on and ill muck around wif the triggers at home in about 2 hours and try it out. these are based on if u want the spell to stack... like 2 guys cast mother storm (or wateva the spells called) and it deals more damage for each storm around, i dunno i'll get bak 2 u. srry 4 the spelling i cant b screwed. --------------------------------------------------------------------------------------------------------my map is on beta version tonight, come play, feel free to mod! all it is right now is EVERY1S stats modded, new units (just a few), a hero selection, and a couple of reskinned heros and other units, thanks to all the featured skinners of the skins, ill put u in credits as soon as i finish. |
| 11-18-2004, 03:49 AM | #15 |
Guest | hahaha i left out the map name, it will b called WoTF or Madhamsta on europe servers tonight about 6:45-8:00 |
