Sup guys, i really need some help with this. I am just going crazy.
First off i know crap about JASS, but i've found this particular system some time ago. I already gave up one map development because i couldn't get the system to handle more than 60 secs revival time.
So, here's the deal. I got this system and changed the wait time for more than 60 secs and it just doesn't works. My guess is that it just doesn't support more than that, OK, np, i then tried to adjust the system to handle more than 60secs using a Countdown Timer. The code is below:
OK, now the explaining. As you can see, i made it so that the code depends on the countdown timer, this way i can set whatever time i want.
The code is partially working, it revives correctly if u kill about 15-, but if you go crazy and kill 30+, it starts bugging everything. Some creeps won't revive, others are revived when they shouldn't...
So, if ne1 is experencied enough help me plz. I'll send a PM with the map's download link if you want to.
Thanks in advance.
First off i know crap about JASS, but i've found this particular system some time ago. I already gave up one map development because i couldn't get the system to handle more than 60 secs revival time.
So, here's the deal. I got this system and changed the wait time for more than 60 secs and it just doesn't works. My guess is that it just doesn't support more than that, OK, np, i then tried to adjust the system to handle more than 60secs using a Countdown Timer. The code is below:
Code:
Creep Revival System Initialization
Events
Map Initialization
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
Loop - Actions
Set Integer = (Integer + 1)
Unit - Set the custom value of (Picked unit) to Integer
Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
Set Unit[Integer] = (Picked unit)
Code:
Timer RUN
Events
Time - RS_Revive_Timer expires
Conditions
Actions
Countdown Timer - Start RS_Revive_Timer as a One-shot timer that will expire in 40.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title TIMER
Trigger - Run Revive <gen> (checking conditions)
Code:
Revive
Events
Conditions
Actions
For each (Integer A) from 0 to Integer, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit[(Integer A)] is dead) Equal to True
Then - Actions
Set tempPoint[1] = (Center of (Entire map))
Set tempPoint[2] = (tempPoint[1] offset by (Creep_X[(Custom value of Unit[(Integer A)])], Creep_Y[(Custom value of Unit[(Integer A)])]))
Unit - Create 1 (Unit-type of Unit[(Integer A)]) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of Unit[(Integer A)])], Creep_Y[(Custom value of Unit[(Integer A)])])) facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to (Custom value of Unit[(Integer A)])
Set Unit[(Integer A)] = (Last created unit)
Custom script: call RemoveLocation(udg_tempPoint[1])
Custom script: call RemoveLocation(udg_tempPoint[2])
Else - Actions
Do nothing
OK, now the explaining. As you can see, i made it so that the code depends on the countdown timer, this way i can set whatever time i want.
The code is partially working, it revives correctly if u kill about 15-, but if you go crazy and kill 30+, it starts bugging everything. Some creeps won't revive, others are revived when they shouldn't...
So, if ne1 is experencied enough help me plz. I'll send a PM with the map's download link if you want to.
Thanks in advance.