Creep respawn

Status
Not open for further replies.
Werbung:

refl3ction

New Member
if your looking for a simple creep respawn here:

Code:
Untitled Trigger 001
????Events
????????Unit - A unit owned by Neutral Hostile Dies
????Conditions
????Actions
????????Wait (Random real number between 30.00 and 60.00) seconds
????????Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at (Position of (Dying unit)) facing Default building facing degrees
 

-=GhosT=-

New Member
if your looking for a simple creep respawn here:

Code:
Untitled Trigger 001
????Events
????????Unit - A unit owned by Neutral Hostile Dies
????Conditions
????Actions
????????Wait (Random real number between 30.00 and 60.00) seconds
????????Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at (Position of (Dying unit)) facing Default building facing degrees
[/b]


Hey, that works...great to have a simple thinker for (one of) our newest member(s).
[/b]

worst respawn ever made, its usually used but, it respawn creep at position where it died not in position where it were created, so later it may result at map with creeps ONLY in one place
 

-=GhosT=-

New Member
ok, so first off we need those variables : (those variable types are from polish version, i dont know does they exist in english xD)

Code:
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[/b]

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[/b]


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[/b]
 

afan

New Member
Use the JASS one it is the most effective way in that it will spawn them where they died and that it has no memory leaks(GUI cant solve memory leaks)
 

Rebel-Turret

New Member
hmmmm i would show how to do this Correctlly but i am currentlly too much of busy to do anything and show as i am doing i dunon what.
 
Werbung:
Status
Not open for further replies.
Top