• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

make unit available or unavailable

Status
Not open for further replies.
Hello
Here is my problem:
I'm making a game like sc2, each mission gives you a new unit. but i want that when the player leaves the mission, the unit will become unavailable, if the player ends the mission, he will keep the unit for nexts missiosns
does someone can tell me how?
oh and another thing
i need a kind of menu for these kind of thing
I need a button that will show what are the nexts availables, prssing this button will shows the mission and pressing a mission button will teleport your hero to the mission.
a button that shows you what unit will be available for each mission available. pressing this button will shows all availables mission and pressing a mission button will shows you the name of the unit

in mission, i need
a button to abandon the mission, then the unit that was available in the mission will become unavailable.
a button to restart the mission, pressing it will put all unit back to their original position and remove extra unit. (The hero doesnt have level, so you dont need to tell me how to make its xp back)

i think thats all thanks to help me bye
 
Level 8
Joined
Dec 12, 2010
Messages
280
Here's a example of a simple dialog button trigger that creates the dialog with buttons. You'll need to make a few variables for this trigger. Two for the dialog buttons and one for the clicked dialog.

  • Dialog Button
    • Events
      • Unit - A unit enters some region
    • Conditions
      • (Some unit <gen> is dead) Equal to True
      • (Entering unit is a Hero) Equal to True
    • Actions
      • Dialog - Create a dialog button for Dialog1 labelled Yes
      • Set Yes = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog1 labelled No
      • Set No = (Last created dialog Button)
      • Dialog - Change the title of Dialog1 to Do you accept the ...
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Dialog - Show Dialog1 for (Picked player)
This would be good just the way it is if you wanted the dialog to show once the hero enter a certain area after defeating a certain unit. Ofc you can change the event and condition for your map.

Here the trigger where the dialog is clicked and you would put your actions.

  • Clicked Dialog1
    • Events
      • Dialog - A dialog button is clicked for Dialog1
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to Yes
        • Then - Actions
          • Sound - Play MouseClick1 <gen>
          • Dialog - Hide Dialog1 for (Triggering player)
        • Else - Actions
          • Sound - Play MouseClick1 <gen>
          • Dialog - Hide Dialog1 for RandomPlayer
 
Status
Not open for further replies.
Top