# question on wait in this trigger (wait without varriables = MPI still?)

Status
Not open for further replies.

#### millzy

Level 15
i have this spell that uses a missle system and when it takes some time b4 the missles hit the ground and i want to do bla bla bla to the units when they are hit so i added a wait to wait untill the missle hits the units.

here is the trigger
• Dark ground
• Events
• Unit - A unit Starts the effect of an ability
• Conditions
• (Ability being cast) Equal to Example #3
• Actions
• Set DG_Damage[(Player number of (Owner of (Triggering unit)))] = (75 x (Level of Example #3 for (Triggering unit)))
• Set DG_Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
• Set DG_point[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
• For each (Integer B) from 1 to 10, do (Actions)
• Loop - Actions
• Set MS_dmg_source = (Casting unit)
• Set MS_owner = (Owner of (Casting unit))
• Set MS_create_point = (Position of (Casting unit))
• Set MS_seconds_to_reach = 1.50
• Set MS_target_point = ((Target point of ability being cast) offset by 150.00 towards ((Real((Integer B))) x (360.00 / 10.00)) degrees)
• Set MS_distance = (Distance between MS_create_point and MS_target_point)
• Set MS_angle = (Angle from MS_create_point to MS_target_point)
• Set MS_missile_gfx = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
• Set MS_parabola = True
• Set MS_parabola_height = 800.00
• Trigger - Run MS init <gen> (ignoring conditions)
• Custom script: call RemoveLocation(udg_MS_create_point)
• Custom script: call RemoveLocation(udg_MS_target_point)
• For each (Integer B) from 1 to 5, do (Actions)
• Loop - Actions
• Set MS_dmg_source = (Casting unit)
• Set MS_owner = (Owner of (Casting unit))
• Set MS_create_point = (Position of (Casting unit))
• Set MS_seconds_to_reach = 1.50
• Set MS_target_point = ((Target point of ability being cast) offset by 50.00 towards ((Real((Integer B))) x (360.00 / 5.00)) degrees)
• Set MS_distance = (Distance between MS_create_point and MS_target_point)
• Set MS_angle = (Angle from MS_create_point to MS_target_point)
• Set MS_missile_gfx = Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
• Set MS_parabola = True
• Set MS_parabola_height = 800.00
• Trigger - Run MS init <gen> (ignoring conditions)
• Custom script: call RemoveLocation(udg_MS_create_point)
• Custom script: call RemoveLocation(udg_MS_target_point)
• Wait 1.40 seconds
• Unit Group - Pick every unit in (Units within 250.00 of DG_point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
• Loop - Actions
• Unit - Create 1 dummy for (Owner of DG_Caster[(Player number of (Owner of (Triggering unit)))]) at DG_point[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
• Unit - Add Soul Burn to (Last created unit)
• Unit - Set level of Soul Burn for (Last created unit) to (Level of Example #3 for DG_Caster[(Player number of (Owner of (Triggering unit)))])
• Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn (Picked unit)
• Unit - Cause (Last created unit) to damage (Picked unit), dealing (Real(DG_Damage[(Player number of (Owner of (Triggering unit)))])) damage of attack type Spells and damage type Normal

#### water_Knight

Level 8
It is but isn't. if some one else casts it in the 1.40 seconds it will go to the new point otherwise it will work fine xD.

#### millzy

Level 15
a point is created for each player but

#### x3GlikE

Level 11
Why don't you create like another trigger with
• Time - Every 0.3 second
Set a valve when the valve +0.3 reaches 1.40 than blah blah blah

#### Maker

Level 37
It is MPI if you don't cast it again with the same unit before the timer expires. Post the MS Init trigger so I can see whether that is MPI or not.

Leak:
• Set MS_target_point = ((Target point of ability being cast) offset by 150.00 towards ((Real((Integer B))) x (360.00 / 10.00)) degrees)
Also leks the unit group.

Waits are a bit inaccurate, a 1.4 second wait could be 1.5-1.6 seconds for example.

#### millzy

Level 15
the ms_target_point is removed

yer i know about the unit group

i dont think that will matter

the missle system is MPI

#### millzy

Level 15
what do u mean that sets the variable how else would i do it??

#### millzy

Level 15
that wont help me..... i know it leaks and its a point that leaks

EDIT NVM itsd the offset point that leaks i was confused soz

#### Cihparg

Level 16
There isn't only a point leak.
What do you have here, leaky ?
[trigger="x2 [30 leaks each time the trigger is ran]"]Set MS_target_point = ((Target point of ability being cast) offset by 150.00 towards ((Real((Integer B))) x (360.00 / 10.00)) degrees)[/trigger]
[trigger="[1 leak each time the trigger is ran]"]Unit Group - Pick every unit in (Units within 250.00 of DG_point[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is alive) Equal to True)))) and do (Actions)[/trigger]

31 leaks detected.
Trigger is not MUI or MPI.

#### millzy

Level 15
hhhmmmmmm i got one person telling me its mpi and one telling me its not ????

#### Justify

Level 13
It is MPI. MPI only means that one unit of each player can do it at the same time, 12 units in total.
Your spell would bug if a) more then unit per player can use this or b) the spellcooldown is lower then 1.4 seconds. However, b) would not mean it's not MPI due to its definition.

#### millzy

Level 15
thanks alot

Status
Not open for further replies.

Replies
14
Views
1K
[Trigger] Z-Detect Help
Replies
5
Views
633
Replies
3
Views
615
Replies
24
Views
2K
[Trigger] Wait-Problem
Replies
8
Views
951