• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spell Problem

Status
Not open for further replies.
Level 22
Joined
Jan 10, 2005
Messages
3,426
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
 
Level 3
Joined
Mar 2, 2006
Messages
40
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 :
Code:
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)
 
Status
Not open for further replies.
Top