| 02-19-2003, 01:26 AM | #1 |
im makin a custom trigger enhanced spell, not using JASS, but its warstomp so it doesnt have a target so i got some of it working but could u plz tell me whats wrong. The healing of the friendlies work, but the killing of the others does not....well here goes: Events: A unit owned by player 1 is issued an order without a target Condition: Issued order is equal to warstomp Actions: Pick every unit in (Units within 99999 of postion of ordered unit) and do: If (((picked unit) belongs to an ally of (player 1)) equal to true) then do (unit- set life of (picked unit) to (life of picked unit)+500)) Else Pick every unit in Units within 999999 of position of *ordered* unit) and do (Unit-kill picked unit) *i think this might be the problem, can someone plz help me that knows about triggers |
| 02-19-2003, 01:32 AM | #2 |
Guest | The If\Then\Else is the problem! And, dont you think thats a bit cheap? Do: If [owner of [picked unit]] [equal] to [Ally of Player [1]] then do [Set life of [picked unit] to [100]%] else do [Do Nothing] If [owner of [picked unit]] [not equal] to [Ally of Player [1]] then do [Set life of [picked unit] to [0]%] else do [Do Nothing] |
| 02-19-2003, 01:32 AM | #3 |
I found the error: remove the all of the code in the else and change it to Kill(PickedUnit) (no need to pick all the units a second time) |
| 02-19-2003, 01:42 AM | #4 |
thx guys, i think ill use your change mar sara because i dont understand what u want me to do spectre. Will u plz make that into an actual action statement. I dont under stand, would i make a if/then/else staement with those 2 actions? oh, and by the way, its not cheap cause its not actually a spell, im just using it as a test so i can hone my trigger bsaed spell ability again, thx EDIT: Sorry Marsara, but the edit didnt work, it still healed the units, but the other units werent killed |
| 02-19-2003, 10:48 AM | #5 |
Events: A unit owned by player 1 is issued an order without a target Condition: Issued order is equal to warstomp Actions: Pick every unit in (Units within 99999 of postion of ordered unit) and do: If (((picked unit) belongs to an ally of (player 1)) equal to true) then do (unit- set life of (picked unit) to (life of picked unit)+500)) Else (Unit-kill picked unit) |
| 02-19-2003, 11:32 AM | #6 |
thanx, i figured out what i did, when i was pickin all units, i used the pick all units that match condition that they were friendlies so to begin with it was never pickin any unfriendly units. Thx |
