HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Tornado Trigger

09-14-2003, 11:15 PM#1
Poe_boe
Well first of all im using ROC and i got a tornado and i want units who come in range with it will take dmg per second i tryed doing this but it didnt work

Event

Unit - A unit comes within 300.00 of Tornado 0230 <gen>


Action

Wait 0.50 seconds

Unit - Set life of (Triggering unit) to -2.00


it probaly very simple but i have no clue what to do someone help
09-14-2003, 11:23 PM#2
Raptor--
well the wait makes it mess up i think, losing the reference to the triggering unit

also, setting their life to -2 means ACTUALLY setting their life to -2, thus they die instantly

you want set life of triggering unit to (life of triggering unit - 2)

also that will only run when the unit enters the area of the tornado

you'd probably want a periodic that picks all units in X range of the tornado and sets their life down
09-14-2003, 11:31 PM#3
Balthamos
Ok, what you really want is to create a spell modelled off immolation with no visual effects. But if you can't do spell editing then triggers will have to suffice.

No offense, but I can tell you're not very experienced with triggers, so I'll explain the problems with what you've got and how to replace that with a trigger...

Event
Unit - A unit comes within 300.00 of Tornado 0230 <gen>
(This is a once off event, it won't continously occur unless the unit came within range again and again. You want a periodic event, let's say "Timer - Periodic Timer every 1 second")
Action
Wait 0.50 seconds
(this just waits for half a second before continuing with the next triggers. When you use this action, all unit data like 'triggering unit', 'attacking unit', 'dying unit' etc, any that relate to a trigger response, are lost)
Unit - Set life of (Triggering unit) to -2.00
(two problems here, you've stated the triggering unit, i.e. a unit who's id was lost because you used the wait command. And secondly you set his life to negative 2...you want to set his life, to an arithmatic statement "Set Life of Unit to Life of unit - 2.00" look under "unit property" for life and mana etc.)

A trigger that would work for your case would be...
EVENT: Periodic Event every 3 seconds
CONDITION: Null
ACTION: Pick every unit in 300.00 range of Tornado 0230
Unit - Set life of picked unit to life of picked unit - 2.00

However that will only work for a preset Tornado, if the tornado is a summoned spell and you want this to work, and if you only want the tornado to damage units not owned by the player who owns the tornado, then do this trigger.

EVENT: Periodic Event every 3 seconds
CONDITION: Null
ACTION: Pick every unit in playable map area matching unit type of Tornado
Set VariableUnit = picked unit
Pick every unit in 300.00 range of VariableUnit
If owner of picked unit is not equal to owner of VariableUnit then Set life of picked unit to life of picked unit - 2.00 else do nothing

Voila, I hope this helps, although it may just go straight over your head. No offense.
Goodluck.
09-14-2003, 11:32 PM#4
Poe_boe
it wont let me do the trigger (life of triggering unit - 2)
09-14-2003, 11:35 PM#5
FyreDaug
Arithmetic.
09-14-2003, 11:35 PM#6
Balthamos
ok, the trigger we mean is an action it's under the units section of the actions...
I don't have access to WE right now but it's something like...

Unit - Set life of unit to ....

The .... should be an arithmatic action, it's the default for any type of variable settings.

Something + Something
Change the first something to Unit - Property etc life of unit...
and the + to a - and the second Something to '2.00'
Ok?
09-14-2003, 11:37 PM#7
Poe_boe
Thx It worked :)
09-14-2003, 11:46 PM#8
Poe_boe
this is what i did Unit Group - Pick every unit in (Units within 512.00 of (Position of Tornado 0230 <gen>)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + -2.00))
09-14-2003, 11:58 PM#9
FyreDaug
+ -2.00 isn't the best way to go, and I'm not sure if Jass works properly that way, but just make the 2 positive, and change the + to a -
09-15-2003, 12:11 AM#10
Poe_boe
i switched the -2 with a -8 and it works great
09-15-2003, 05:05 PM#11
FF_Behemoth
Why dont you base your spell off like Spirit Wolf or WE and change their art-model to tornado graphics. Then create a ability base off phoenix fire (for the dmg) and give that ability to your custmized spirit wolf or WE

- ByTe.ME uswest