• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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 15
Joined
Aug 31, 2009
Messages
776
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