Make enemy teleport?

Level 10
Joined
Apr 3, 2006
Messages
535
Is it possible to make an enemy teleport or use a scroll of town portal? or even create a teleport special effect?
 
Level 10
Joined
Apr 3, 2006
Messages
535
ok, im trying to do a boss fight, and when the enmys life becomes low, say 25% or below the enemy goes a grand escape(teleports) or does something for show then disspaears from the room it doesnt mastter where as long as it makes it out of the room alive really. So it can be used later on for story/another fight
 
Level 4
Joined
Dec 15, 2007
Messages
108
make unit locuost and invulnurable create spezial effect[1] set it to last createt spezial effect then then w8 destroy spezial effect [1]
 
Level 11
Joined
Dec 11, 2007
Messages
890
Here is the simple way to do this:

  • Events:
    • Time - Every 0.01 seconds of game time
  • Actions:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Picked unit)) Equal to Footman (example)
        • (Life of (Picked unit)) Less than or equal to 200.00 (give a value)
      • Then - Actions
        • Unit Group - Pick every unit in (Units owned by Player x) and do (Unit - Order (Picked unit) to Hold Position)
        • Wait 0.70 seconds
        • Unit Group - Pick every unit in (Units owned by Player x) and do (Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl)
        • Unit Group - Pick every unit in (Units owned by Player x) and do (Unit - Move (Picked unit) instantly to (Center of region-make a region where the creature will teleport)
      • Else - Actions
 
Level 15
Joined
Jan 16, 2008
Messages
1,244
Do not use that trigger! It kinda sucks... First of all, trigger spawn interval is 0.01 sec and a wait order inside it is 0.7 sec. Can't you see where it leads to? It means that once the conditions are true, 70 trigger instances will be created due to that wait thingy. One other thing. Picked unit refers to the following action: Pick every unit in unit group and do one or more actions, those conditions of yours are not good. Here is what you must do:
  • Events
    • Unit - a unit is attacked
  • Conditions
    • life of (attacked unit) less than or equal to 'your number here'
    • Unit-type of (Attacked unit) equal to 'your boss here'
  • Actions
    • Special effect - Create special effect at (position of(attacked unit)) using 'your model here'
    • Unit - Move unit instantly to center of 'your region here'
    • Special effect - Create special effect at (position of(attacked unit)) using 'your model here'
Notice:
words in '' are to be replaced by your custom values.
first effect is at the point where your boss disappears, second is at the point where he arrives

hope this helps!
P.S.
You might want to destroy those special effects later, just asign a variable to them and destroy them whenever you want.
 
Level 10
Joined
Apr 3, 2006
Messages
535
thansk for the replies, i take it the special effect i want is:

Abilities\Spells\Human\MassTeleport\MassTeleportCaster.md
 
Level 10
Joined
Apr 3, 2006
Messages
535
i could pause the unit? for a few seconds whilst its casting to stop it abusing the teleoprt
 
Top