• 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] how can i use tranquility to resurrect or plant trees

Status
Not open for further replies.
Level 25
Joined
May 11, 2007
Messages
4,650
A unit uses an ability
ability = trans
trigger turn on trans healing trigger

trans healing trigger:
every 0.5 seconds
pick every destructible around unit_hero and do:
if destructible health < destrucitble max
destructible set health + 1
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Well then in addition to LordDz's trigger, add the lines:

  • Region - Center Tree Region <gen> on (Position of (Casting unit))
  • Destructible - Create a Summer Tree Wall at (Random point in Tree Region <gen>) facing (Random angle) with scale 1.00 and variation 0
This is the only way I can think of doing it. It will create 1 tree at a random point around the caster of tranquility. If you wanted trees to be created every 0.5 seconds, then you'd need the second periodic running trigger LordDz posted.
 
Level 25
Joined
May 11, 2007
Messages
4,650
set tempReal = math random number between 10 and 40
Set temppoint1 center of triggering unit
set temppoint2 = temppoint1 offset by tempReal facing math - random angle
Destructible - Create a Summer Tree Wall at temppoint2 facing (Random angle) with scale 1.00 and variation random number between 0 and 7
 
Status
Not open for further replies.
Top