• 🏆 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!

Some question Need help!

Status
Not open for further replies.
Level 2
Joined
Nov 3, 2007
Messages
6
okay people i need help on some triggers that is starting to bug me.
Im working on a maze and these are the following triggers i need...
1.if a hero dies 3 times it will not respawn.
2.Make 1 continue if every1 fails they will have another chance.
3. in the start how to remove the player hero if there no user.
4. how to limit the heros inventory to 1.
PLz and thankyou
 
Level 14
Joined
Aug 31, 2009
Messages
775
1.
You want to count an Integer. So, when all the heroes die, you set this integer to be 1 less. If the integer is -1, then the heroes have run out of chances and you can make them fail there if you want.
  • Set Integer = Integer - 1
  • If (all conditions are True) then do (Then actions) else do (else actions)
    • if - Conditions
      • Integer equal to -1
    • Then - Actions
      • ------ Add stuff here for what happens when they fail ------
    • Else - Actions
      • ------ Add stuff here for what happens when they still have chances left ------
2.
This is again just counting an Integer.
Add into the previous trigger a second count, so something like this:
  • Set Integer = Integer - 1
  • If (all conditions are True) then do (Then actions) else do (else actions)
    • if - Conditions
      • Integer equal to -1
    • Then - Actions
      • Set Integer = 3
      • Set Integer2 = Integer2 - 1
      • If (all conditions are True) then do (Then actions) else do (else actions)
        • If - Conditions
          • Integer2 = -1
        • Then - Actions
          • EPIC FAIL
        • Else
          • -----Add stuff here telling them they're dying too much!------
    • Else - Actions
      • ------ Add stuff here for what happens when they still have chances left ------
Integer is a Variable of the type Integer.
Integer2 is a Variable of the type Integer.

3.
As simple as:
  • Remove Unwanted Heroes
  • Events
    • Time - Game time is 0.00 seconds.
  • Conditions
  • Actions
    • Set TempGroup = Units in (Playable Map area)
    • Unit Group - Pick every unit in TempGroup and do (actions
      • Loop - Actions
        • If (all conditions are True) then do (Then actions) else do (Else actions)
          • If - Condtions
            • (Owner of (Picked Unit)) slot status equal to (Is playing)
          • Then - Actions
          • Else - Actions
            • Unit - Remove (Picked Unit) from the game
    • Custom script: call DestroyGroup(udg_TempGroup)
TempGroup is a Variable of the type Unit Group.


4.
Go into the Object editor and find the ability "Inventory (Hero)"
There is simply a field that says "Data - Item Capacity". Just change this to 1.
 
Status
Not open for further replies.
Top