Hi, I'm trying to make a map where you can choose a class, similar to Storm of the Imperial Sands, but I want the player to be able to change the class at any given time. BUT the problem I'm having is that upon changing class I want it to remove all units that the player previously had, AND I also want there to be a respawn timer for every time someone loses all of their units. Any help would be appreciated, thanks.
One way may be to have any unit or building whenever a building is created/unit trained said player creates into a unit group, and then when that player wants to re choose their class, destroy/remove every unit in said unit group.
As for the timer, I'm confused as to what you are asking for. Like a cooldown on how often they can do this? Or if they get destroyed, x amount of time before units start to respawn again?
All units are created are created through triggers. Basically you pick from a menu, but you can reopen the menu at any time to change your class, in which case I want it to remove all of your previous units. What I'm saying about the timer is that I want it so that whenever you run out of units, whether it's from picking a different class, or from your units being killed, I want a penalty timer for losing your units where you have to wait a certain period of time (say 20 seconds) before you can obtain units again.
Also, being new to the editor, I'm having trouble finding the trigger to remove units.. What trigger is it exactly?
I'm having trouble finding the trigger to remove units.. What trigger is it exactly?
Unit - Remove unit :)
About what you're trying to achieve, I'd suggest adding a variable (integer) that will be used to store the timer seconds. Example: The default timer is 20 seconds. When the player change his hero or when his hero dies, you want this value to be 10 more seconds (each time it happens). So, you will need "Set variable = variable+10" (it's a simple arithmetic operation to increment the number of seconds needed before respawn), and you just have to start a new timer lasting "variable" seconds and will respawn/change the hero when it's done.
Hmm, well I guess my main problem is that I'm not sure how to stop the player from picking a class again after his units have died and the timer is up. Is there some sort of delay trigger that I can used combined with a condition where if the timer is up for the player, the next class he picks will be delayed until the timer is done? Ideas?
It's currently in my triggers so that after you click on the new class you wish to be, all of your current men are killed and then your new men are created. I'm guessing there's a better way to set this up and add in the timer. And how would I trigger it so that while the timer is up there is a delay on your men being created?
Hi, I'm trying to make a map where you can choose a class, similar to Storm of the Imperial Sands, but I want the player to be able to change the class at any given time. BUT the problem I'm having is that upon changing class I want it to remove all units that the player previously had, AND I also want there to be a respawn timer for every time someone loses all of their units. Any help would be appreciated, thanks.
@user_877009: Go
One way may be to have any unit or building whenever a building is created/unit trained said player creates into a unit group, and then when that player wants to re choose their class, destroy/remove every unit in said unit group.
As for the timer, I'm confused as to what you are asking for. Like a cooldown on how often they can do this? Or if they get destroyed, x amount of time before units start to respawn again?
@Feithless: Go
All units are created are created through triggers. Basically you pick from a menu, but you can reopen the menu at any time to change your class, in which case I want it to remove all of your previous units. What I'm saying about the timer is that I want it so that whenever you run out of units, whether it's from picking a different class, or from your units being killed, I want a penalty timer for losing your units where you have to wait a certain period of time (say 20 seconds) before you can obtain units again. Also, being new to the editor, I'm having trouble finding the trigger to remove units.. What trigger is it exactly?
@user_877009: Go
bump.
Unit - Remove unit :)
About what you're trying to achieve, I'd suggest adding a variable (integer) that will be used to store the timer seconds. Example: The default timer is 20 seconds. When the player change his hero or when his hero dies, you want this value to be 10 more seconds (each time it happens). So, you will need "Set variable = variable+10" (it's a simple arithmetic operation to increment the number of seconds needed before respawn), and you just have to start a new timer lasting "variable" seconds and will respawn/change the hero when it's done.
If I didn't make myself clear, just ask.
@ZealNaga: Go
Hmm, well I guess my main problem is that I'm not sure how to stop the player from picking a class again after his units have died and the timer is up. Is there some sort of delay trigger that I can used combined with a condition where if the timer is up for the player, the next class he picks will be delayed until the timer is done? Ideas?
@user_877009: Go
It's currently in my triggers so that after you click on the new class you wish to be, all of your current men are killed and then your new men are created. I'm guessing there's a better way to set this up and add in the timer. And how would I trigger it so that while the timer is up there is a delay on your men being created?
bump