AceHart
Your Friendly Neighborhood Admin
- Reaction score
- 1,496
You can't queue orders with triggers...
It's one order at a time.
It's one order at a time.
Event:
Unit- A unit finishes the traning of a unit
Condition:
(unit-type of (trained unit)) = MyUnit
Action:
If, then else, action:
Condition:
(MyArea contains (position of(trained unit))) = true
Then:
Unit- Order (trained unit) to move a Center of (MyArea 2)
Else:
Unit- Order (trained unit) to move at Center of (MyArea 3)
Wait 2.00 seconds
Unit- Order (trained unit) to hold position
Event:
Every 2 seconds of game time (just example)
Condition:
8unit-type of (ordered unit)) = MyUnit
Action:
Order (Units in MyArea) to hold position
Event:
If sadcasödlktro (doesn't matter)
Condition:
Action:
Run MyTrigger
Event:
Condition:
Action:
Do smthing (doesn't matter what)
Turn off this trigger
If a unit comes with in range of MyVariableUnit
Event:
Doesn't matter
Condition:
Action:
Run MyTrigger
Or your solution:
IF:
MyTrigger is on = true
Then:
Run MyTrigger
Event:
Condition:
Action:
Add to (1. trigger) the event (A unit comes withing range of 80 of MyVariableUnit)
> it adds events over and over again
Well, then don't...
If (myUnitGroup contains <unit>) equal to false then
- Unit group - Add <unit> to myUnitGroup
- Trigger - Add event...
Occasionally, it happens that you get better replies when you forget about the perceived solution, and explain what the actual problem is.
If (myUnitGroup contains <unit>) equal to false then
- Unit group - Add <unit> to myUnitGroup
- Trigger - Add event...
Event:
A unit comes within 800 of MyUnit
Condition:
Action:
Set Distanz_UnitTooMyUnit = (Distance between (Position of (Triggering unit)) an (Position of MyUnit))
Set Pull_Direction = (angle from (Position of (Triggering unit)) to Position of MyUnit))
For each (Integer A) from 1 to (Integer((Distanz_UnitTooMyunit))), do actions
Loop - actions:
Move (Triggering unit) instantly to ((position of (Triggering unit)) offset by 10 towards Pull_Direction degrees)
Wait o.o1 seconds
Event:
A unit gets an order with an object as target
Condition:
(Issued order) = (Order((Name of MySpell)))
Action:
Doesn't matter
EDIT:
Question 22:
This dont works. Why?
Code:Event: A unit gets an order with an object as target Condition: (Issued order) = (Order((Name of MySpell))) Action: Doesn't matter
Event:
A unit is issued an order targetting an object
Condition:
Issued order = o(order((Name of MySpell))) (MySpell is based on the hammer throwing spell )
Action:
Set Caster = Ordered unit
Set C_fly_hight = (Default flying height of (ordered unit))
Set Grapped_Unit = (Target unit of issued order)
Change caster flying height to 45 at 2000
Order Caster to move at (Position of Grapped_Unit)
Wait 0.5 seconds
Add classification of Land-Unit to Caster
Remove classification of an air-unit from Caster
Run MyTrigger1 (checking conditions)
Turn on MyTrigger2
You mean "A unit is issued an order targetting an object"?