Disable heroes for training

Status
Not open for further replies.
Level 5
Joined
Nov 21, 2014
Messages
151
Hey there! After a certain action (a tech research, not important) a certain hero will come available. And will be disabled at the start of the game. But the unit never seems to get disabled at the start of the game.. If i go to the trigger, open it, and press ok, and launch the game it's fine, but if I then alter the unit or save or anything, it will revert back to normal... This problem does not occur with normal units... and I have absolutely no clue what's wrong.. Is it always this buggy when done on heroes? I hope not. Thanks in advance as always (sorry for the wall of text) :vw_wtf::vw_wtf:
 
That's hardly a wall of text. No apologies needed. Do I understand correctly, you want the icon of the initially disabled hero to show at the beginning of the game. Then upon the happening of a certain event you want the hero to become available. The hero is trained by an alter or sold in a shop. Am I right so far?

Ok, so what you want to do is set the tech-requirements of the hero in object editor. Set the research as a requirement and this should work. Also, add this hero to gameplay constants.

Another way may be to make it unavailable by trigger and then upon the event in question make it available. This will however make the icon disappear at the start and reappear later.

Finally, you may use an "out of stock" dummy hero. Then upon the happening of the event replace it with the real hero. You could make other dummy types too using a DISBTN icon and exporting it and importing it as a new name starting with BTN. Now make the unit free and have no model. When the player clicks on it nothing will happen. Maybe remove the unit from game by trigger. Set the tool tip to explain why it is not available. Once the condition is satisfied, switch the dummy out for the real hero. Sorry, I don't have WE with me, so I can't post the triggers.

Almost a wall of text. Hope I helped.
 
Level 5
Joined
Nov 21, 2014
Messages
151
That's hardly a wall of text. No apologies needed. Do I understand correctly, you want the icon of the initially disabled hero to show at the beginning of the game. Then upon the happening of a certain event you want the hero to become available. The hero is trained by an alter or sold in a shop. Am I right so far?

Ok, so what you want to do is set the tech-requirements of the hero in object editor. Set the research as a requirement and this should work. Also, add this hero to gameplay constants.

Another way may be to make it unavailable by trigger and then upon the event in question make it available. This will however make the icon disappear at the start and reappear later.

Finally, you may use an "out of stock" dummy hero. Then upon the happening of the event replace it with the real hero. You could make other dummy types too using a DISBTN icon and exporting it and importing it as a new name starting with BTN. Now make the unit free and have no model. When the player clicks on it nothing will happen. Maybe remove the unit from game by trigger. Set the tool tip to explain why it is not available. Once the condition is satisfied, switch the dummy out for the real hero. Sorry, I don't have WE with me, so I can't post the triggers.

Almost a wall of text. Hope I helped.

You were partially right, but what I said was exact, I should've been more precise, I do disable/enable it via trigger (removed from altar start of game then added after that tech research) I do this with normal units too, but it works fine, but with heroes it doesn't. I do this with 3 heroes, and 2 of them don't work, or bug while one is perfectly fine while the code is 100% of the same. That's why I made this post, sorry for being not precise enough :)
 
Level 5
Joined
Nov 21, 2014
Messages
151
Well as I said, they worked before and stopped working after I added them to that list... (In gameplay constants). I have added about ~12 heroes to that list, is that too many?
 
Status
Not open for further replies.
Top