Warcraft III resources & community, 2003–2006 · archived

Spell Problem

3 posts
#1

Spell Problem

Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Unit - Create 1 Tree Killer for (Owner of Kalaya) at (Position of Kalaya) facing (Position of (Triggering unit))
Unit - Order (Last created unit) to Attack (Random destructible in (Rect centered at (Position of Kalaya) with size (1000.00, 1000.00)) matching (((Destructible-type of (Matching destructible)) Equal to Ashenvale Tree Wall) or ((Destructible-type of (Matching destructible)) Equal to Ashenvale Canopy T
Set TreeKillerAttackPoint = (Position of (Target destructible of issued order))
Advanced - Wait for event: A destructable dies in (Rect centered at (Position of Kalaya) with size (1001.00, 1001.00)). Check every 0.01 seconds.
Special Effect - Create a special effect at TreeKillerAttackPoint using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl
Unit - Create 1 Treant for (Owner of Kalaya) at TreeKillerAttackPoint facing (Position of Kalaya)
Unit - Order (Last created unit) to Attack-Move To (Position of Kalaya)

Tree Killer = a dummy unit with a missle that kills trees
Kalaya = the hero

My problem is that the treants spawn at the center of the map, but I did say what the variable should be. I dunno why it keeps spawning em in the center
#2
Lol don't you know about Event Responces. Event responces are the things involved in a trigger's events. So when using Event Responce - Target Destructible of Issued Order, you mean the destructible targeted in the event of the trigger (used in A unit is issued an order targeting an object ), not the last issued order or anything else. Suggested bugfix: a variable Tree_Target(or something). Then :

Events 
Time - Every 2.00 seconds of game time 
Conditions 
Actions 
Unit - Create 1 Tree Killer for (Owner of Kalaya) at (Position of Kalaya) facing (Position of (Triggering unit))
set Tree_Target = Random destructible in (Rect centered at (Position of Kalaya) with size (1000.00, 1000.00)) matching (((Destructible-type of (Matching destructible)) Equal to Ashenvale Tree Wall) or ((Destructible-type of (Matching destructible)) Equal to Ashenvale Canopy Tree)
Unit - Order (Last created unit) to Attack Tree_Target
Set TreeKillerAttackPoint = Position of Tree_Target 
Advanced - Wait for event: A destructable dies in (Rect centered at (Position of Kalaya) with size (1001.00, 1001.00)). Check every 0.01 seconds. 
Special Effect - Create a special effect at TreeKillerAttackPoint using Objects\Spawnmodels\NightElf\EntBirthTarget\EntBirthTarget.mdl 
Unit - Create 1 Treant for (Owner of Kalaya) at TreeKillerAttackPoint facing (Position of Kalaya) 
Unit - Order (Last created unit) to Attack-Move To (Position of Kalaya)
#3
hm.. I always wondered what the 'event response' was for :oops: :P

thnx alot