• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Anti-Tk-er Trigger

Status
Not open for further replies.
Level 16
Joined
Sep 3, 2004
Messages
2,086
Code:
Unit is attacked
Conditions
Owner of attacked unit is an ally of owner of attacking unit equal to true
Actions
Create a spell dummy at position of attacking unit for neutral hostile
Order last created unit to Druid of the Talon- Cyclone attacking unit
Remove last created unit
 
Level 4
Joined
Aug 6, 2004
Messages
52
Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
((Attacked unit) belongs to an ally of (Triggering player)) Equal to True
Actions
Unit - Create 1 Spell Dummy for Neutral Hostile at (Position of (Attacking unit)) facing Default building facing degrees
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone (Attacking unit)
Unit - Remove (Last created unit) from the game


didnt work, did i do this right, or did i mess up ?
 
Level 4
Joined
Aug 6, 2004
Messages
52
alright, heres what i did, i made a dummy on a random point in the map, and whenevre a unit attacks an allied unit it is moved to them and its "Supposed" to cyclone them, which doesnt happen. Then the unit is moved back to the spot where it was.
 
Level 2
Joined
Jul 16, 2004
Messages
24
Code:
Untitled Trigger 001 
Events 
Unit - A unit Is attacked 
Conditions 
((Attacked unit) belongs to an ally of (Triggering player)) Equal to True 
Actions 
Unit - Create 1 Spell Dummy for Neutral Hostile at (Position of (Attacking unit)) facing Default building facing degrees 
[color=red]Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Cyclone (Attacking unit) 
Unit - Remove (Last created unit) from the game [/color]

the dummy unit will begin to cast the spell, but will be removed before it can cast the spell...

you must put a wait in there, but if you do, it will mess around with the "last created unit" thing. So you must store the unit in a variable

I DONT HAVE WE OPEN.

Code:
Untitled Trigger 001 
Events 
Unit - A unit Is attacked 
Conditions 
((Attacked unit) belongs to an ally of (Triggering player)) Equal to True 
Actions 
Unit - Create 1 Spell Dummy for Neutral Hostile at (Position of (Attacking unit)) facing Default building facing degrees 
set dummy = (Last created unit)
Unit - Order (dummy) to Night Elf Druid Of The Talon - Cyclone (Attacking unit) 
wait 0.5 seconds
Unit - Remove (dummy) from the game

hopefully that works, it isnt multi-instance to an extent... i mean, it is usable by all players but there is a very remote chance that it might not effect a unit/units
 
Level 4
Joined
Aug 5, 2004
Messages
66
(havent WE open)CODE:
Event
a Unit is attacked

Condision

Unit is eaqoal to ally of attacking unit

Action
:Create 1 "unit" for neutral hostile at posision of attacked unit:
:eek:rder last created unit to attack attacking unit:
:wait 2 seconds:
:remove last created unit:


that should work. sry if im not speaking trigger laungchis and sry for my english
 
Level 4
Joined
Aug 6, 2004
Messages
52
crap. alright i got it so it makes units, has the time to cyclone them, getting the unit there and giving it enough time isnt a problem, it just wont cast the spell. well thanks for your help people but i guess ill have to try somethign else.
 
Status
Not open for further replies.
Top