Yet another problem I'm facing in my map. Each player gets a hero unit at the beginning of the game. Due to the nature of the map, the hero unit respawns at the starting point if it dies. However, the condition of victory for Player 1 is for them to reach a certain point with that hero unit.
Now, if their hero unit never dies, it works just fine, as, upon initialization, Player 1's hero unit (named Yurin) is set to a variable which is checked when the unit enters the point.
If the unit dies, however, the newly created unit is not referred to by the variable, as it's a different Yurin. I tried to create an action within the respawn trigger to set the variable to Player 1's Yurin again, after the new one was created. But I think it's still trying to refer to the existing Yurin at the start of the game (since the list only shows units that currently exist). Is there a way to set a unit variable to a unit not-existing at the start of the game? Thanks
Edit: I may have found it, a function that returns the last created unit.
I would have no idea how to do that, but if you could tell me it would help for future requests. I think I may have found the solution to my own issue though, this time around. And apologize for making the post.
underneath your post when your writing it is a big yellow add attachment link
or if its already there click the attack next to edit at the top of the post.
Thanks, makes sense. I thought there was a specific place to upload them, my mistake. I'll post the map next time there's an issue. But, I think I'll be looking a little harder at the problem first ;) to avoid threads like these.
Hello there.
Yet another problem I'm facing in my map. Each player gets a hero unit at the beginning of the game. Due to the nature of the map, the hero unit respawns at the starting point if it dies. However, the condition of victory for Player 1 is for them to reach a certain point with that hero unit.
Now, if their hero unit never dies, it works just fine, as, upon initialization, Player 1's hero unit (named Yurin) is set to a variable which is checked when the unit enters the point.
If the unit dies, however, the newly created unit is not referred to by the variable, as it's a different Yurin. I tried to create an action within the respawn trigger to set the variable to Player 1's Yurin again, after the new one was created. But I think it's still trying to refer to the existing Yurin at the start of the game (since the list only shows units that currently exist). Is there a way to set a unit variable to a unit not-existing at the start of the game? Thanks
Edit: I may have found it, a function that returns the last created unit.
can you post your map so i can take a look?
I would have no idea how to do that, but if you could tell me it would help for future requests. I think I may have found the solution to my own issue though, this time around. And apologize for making the post.
underneath your post when your writing it is a big yellow add attachment link or if its already there click the attack next to edit at the top of the post.
Thanks, makes sense. I thought there was a specific place to upload them, my mistake. I'll post the map next time there's an issue. But, I think I'll be looking a little harder at the problem first ;) to avoid threads like these.
ehh it happens all the time to me too