[Solved] Revive System causes crash

Status
Not open for further replies.
Level 6
Joined
Jan 16, 2017
Messages
110
My map was crashing sometimes and once i discovered that when i remove the revive system then my map is not crashing.
Can someone help me why?
it is divided into 2 types of trigger: when the hero dies and instant respawn when the timer runs out
Screenshot_1.png
Screenshot_2.png
HeroOwner variable is variable of the Hero that dies

I have 16 times this thing in my map for 16 heroes (thats the max limit)
Every player can have max 2 heroes

Anyone knows how to fix it or what causes the crash?
 
Level 6
Joined
Jan 16, 2017
Messages
110
If the timer variable is initialized, it would have a certain handle id. if it does not have one, it is not yet initialized.

For timers, to create an instance, you call CreateTimer(). To initialize an initially null timer variable, you assign the newly-created timer handle to that variable.
Can you make an example?
 
Well, technically. I only declared that function as an example.

If you recall, the Variable Editor in the trigger editor has a certain option, particularly the initial value. Beside it is the size of the variable, if it is an array. Normally, it defaults to a size of 1, which means the indices after 1 will not have any default values.

For a timer, the initial value is a new timer, right? That means the indices after that specified size do not refer to anything in particular.
 
Status
Not open for further replies.
Top