| 10-22-2002, 01:25 AM | #1 |
Guest | Scenario: Okay so theres five human players, lets say I make a trigger to create one Footman for each player and attach a special effect on each Footman. ?: How do I destroy the special effect on the Footman (owned by different players) upon death? |
| 10-22-2002, 01:32 AM | #2 |
Guest | As far as I know, it can't be done. The only way around it would be to create a new footman with the same statz as the previous one, but without the special effect. |
| 10-22-2002, 01:34 AM | #3 |
God damn your avatar is so halarius BeerGut. Anyway on topic no, it can't be done as far as my present knoledge of WE may stretch. |
| 10-23-2002, 12:57 AM | #4 |
Guest | *bump* |
| 10-23-2002, 01:24 AM | #5 |
couldn't you just hold each special effect in a variable? |
| 10-23-2002, 03:37 AM | #6 |
You need to use a variable to hold the special effects, as knightking said. Then, with a Player Owned Unit Event (dies) happens, make it destroy special effect XXX. |
| 10-23-2002, 05:04 PM | #7 |
Guest | Well I'm using one action to create all the special effects, is there a way to set a special effect besides "Last created"? |
| 10-23-2002, 10:29 PM | #8 |
Fear.factor's right. Using a variable array of special effects is the only way to do this right now. "last created special effect" is the only way to refer to non-variable special effects, so each time you place a special effect on a unit, you immediately have to set var[x] to "last created special effect." If you want to avoid custom text, either do the pair of triggers 5 times (create effect, set variable, create effect.........). Or have both actions in a separate trigger, and use a "for" loop to execute that trigger 5 times. Of course in custum text, you can execute mutiple actions in a for loop, so there's no difficulties at all. |
| 10-23-2002, 11:50 PM | #9 |
You can do multiple actions in a for loop without custom text... you just need to make another trigger and do the run trigger action ;) |
| 10-24-2002, 03:24 AM | #10 |
i've heard the special effect has something to do with the corpse of the dying unit.. when he dies his corpse is PERMANENTLY left behind.. so you basically have to remove the model to get rid of the special effect.. not sure how that would be done.. maybe event-unit dies action-wait 10 seconds remove triggering unit that should work |
| 10-26-2002, 03:55 AM | #11 |
Guest | Well can someone explain the "For Loop" stuff to me or point me to a post that does? |
| 10-26-2002, 08:12 PM | #12 |
With pleasure. In regular triggers, you want to do this: Trigger 1: For each (integer a) from 1 to 10 do trigger "createspecialeffects" Trigger2: Special effect - create a special effect on footman "integer a" set effect[integer a] = (last created special effect) where "effect" is a special effect array (created in the variable editor) Now when it comes time to destroy the effects, you can refer to them by number (effect[1], effect[2] etc) so you can destroy 1 or all of them. |
| 10-26-2002, 09:06 PM | #13 |
Guest | thanks :D |
