Post by Ghost on Mar 5, 2006 11:46:55 GMT 1
so, if anyone need respawn trigger here it is
ok, so first off we need those variables : (those variable types are from polish version, i dont know does they exist in english xD)
ok, and now time for triggers
now time for 2nd trigger :
And last one
ok, so first off we need those variables : (those variable types are from polish version, i dont know does they exist in english xD)
variable name: Variable type: Starting Value
creep_count C 0 (default)
creep_dead BDLBQ array(1) NO (default)
creep_pos Point array(1) leave blank
creep_timer timer array(283) New timer (default)
creep_type Unit type leave blank
ok, and now time for triggers
Creep initialization
Event - Elapsed Game Time is 5.00 Seconds
Condition
Action
Unit groupd - pick evry unit in (units owned by Neutral (hostile)) and do (Actions)
Loop - Actions
set creep_count=(creep count + 1)
set creep_pos(creep_count)= (Position of (picked unit))
set creep_type(creep_count)=(unit type of (picked unit))
Unit - Set custom value of (picked unit) to creep_count
Event - Elapsed Game Time is 5.00 Seconds
Condition
Action
Unit groupd - pick evry unit in (units owned by Neutral (hostile)) and do (Actions)
Loop - Actions
set creep_count=(creep count + 1)
set creep_pos(creep_count)= (Position of (picked unit))
set creep_type(creep_count)=(unit type of (picked unit))
Unit - Set custom value of (picked unit) to creep_count
now time for 2nd trigger :
Creep Respawn
Unit - Unit owned by player Neutral (hostile) die
Condition
Action - (For each integer A) from 1 to creep_count, do (actions)
Loop - Actions
If (all conditionsare true) then do (then action) else do (else action)
If - Conditions
Creep_dead (Integer A) equal True
(Remaining time for creep_timer(integer A)) less than or equal 0.00
Then do - actions
Unit - create 1 creep_type (Integer A) for Neutral(hostile) at creep_pos(integer A) facing (Random Angle Degrees)
Unit - Set the custom value of (last created unit) to (integer A)
Set creep_dead (integer A) = false
Else do - Action
Do nothing
Unit - Unit owned by player Neutral (hostile) die
Condition
Action - (For each integer A) from 1 to creep_count, do (actions)
Loop - Actions
If (all conditionsare true) then do (then action) else do (else action)
If - Conditions
Creep_dead (Integer A) equal True
(Remaining time for creep_timer(integer A)) less than or equal 0.00
Then do - actions
Unit - create 1 creep_type (Integer A) for Neutral(hostile) at creep_pos(integer A) facing (Random Angle Degrees)
Unit - Set the custom value of (last created unit) to (integer A)
Set creep_dead (integer A) = false
Else do - Action
Do nothing
And last one
Creep Death
Event - A unit owned by Neutral (hostile) dies
Condition
You may put here some unit that doesnt respawn or something, example
Unit type of (triggering unit) not equal to Death knight
Action
Timer - start creep_timer (Custom value of (dying unit)) as one shot timer that will expire in (Random real number beetwen 75.00 and 90.00 seconds)
Set creep_dead [(custom value of (dying unit))] = True
Event - A unit owned by Neutral (hostile) dies
Condition
You may put here some unit that doesnt respawn or something, example
Unit type of (triggering unit) not equal to Death knight
Action
Timer - start creep_timer (Custom value of (dying unit)) as one shot timer that will expire in (Random real number beetwen 75.00 and 90.00 seconds)
Set creep_dead [(custom value of (dying unit))] = True