• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

respawning and menus

Status
Not open for further replies.
Level 3
Joined
Mar 23, 2010
Messages
46
I'm making a TPS multiplayer game and i need help with:
1. Creating a menu for the player to choose a unit; I want this to change the actor or model and different attributes* of the unit. I also need the menu to pause the game.
2. I would like to have the player unit respawn with the same model that he picked in the menu, but i have come across problems... I can't even make the unit re-spawn! :goblin_jawdrop: So if anyone has any suggestions, please reply!
 
K.

Menus are done through strictly triggers.
I won't bother explaining how to make one in this post, there are many tutorials on the web.
Just do a google search.

For respawns, if it's not a hero just create a trigger that does like..
Event -> (unit) dies.
Condition ->
Action -> Create 1 (unit) for (Player (owner of unit(triggering unit))).

If the unit is say.. a marauder.. just replace (unit) in the action with (marauder).
If it's a hero.. well then I'm not sure.
I know you need to use banks to save the information of the unit, then create another hero and install those attributes into the new unit.
Or something like that.
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
I recall there is another way, too. You can just make a behavior, like the one Thors and odins have. You know, the "OdinDontDie" behavior plus behavior that morphs the unit into some kind of placeholder-unit, you know, a dummy. So the dummy has all attributes and stuff inherited from previous unit and using trrigers, it's moved to the respawn zone, then immediatelly or wjen timer says so the dummy recieves an otrder to morph into the unit it previously was.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
If you want to change some minor attributes and model, you could use same base unit with different actors/models. Then the differences between units could be only minor (what you can do with behaviors). If you want major differences, you should use multiple units.

As for the revival... just use the trigger action "revive unit". BUT in order for that function to work, you need to set the unit's "Death time" to something else than 0 (when it is 0, all the unit's data are deleted instantly when it dies. -1 would make the unit revivable for infinite long)
 
Level 27
Joined
Jul 6, 2008
Messages
11,325
By the way, just a minor advice, but you know, to make the destroyed wall or something look more noticeable, you can try and set it's HDR to less than one instead of decreasing RGB. This will look better. Like try HDR (Or HDD or whatever) 0.6. Or even cooler, set HDR/HDD to -1.
 
Status
Not open for further replies.
Top