• 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.

[General] Deathmatch Mode

Status
Not open for further replies.
Level 5
Joined
Oct 5, 2012
Messages
67
I started implementing a Deathmatch Mode.. This means that after your hero dies, you will get to choose a new one. The new hero has the same level and items as the hero you had before.

I actually got it to work, but my problem is that the hero doesn't get it's items nor does he get his level. He starts as a level 1 hero again :/...

So how do I save items and levels of a dying unit? I tried it with variables but it didn't seem to work.

Thanks!
 
can u show the triggers......

also u need a trigger that stores the items in each slot into a variable. u need a variable to save the lvl of the hero into a variable. then when new hero is selected u need to give him the items and set his lvl to the lvl in the variable. this has to be at least MPI. it will be very easy to make with one array for the items and one array for the lvl.
then u use player number to set the array for the lvl. and ((player number x 6) + slot number) for the item array. also make sure to store player number into a tempInt to be more efficient and store player number x 6 into a tempInt2 to be more efficient
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
How about disable your revive triggers when in Death Match and make a trigger when a hero dies equal to a hero and owner of dying unit is Player 1. Remove dying unit from the game and enable training of hero but just dont forget to disble training when a hero s chosen again.

Try doing this for each player and you should avoid revival for tavern because it will ruin I think this trigger.
 
Level 5
Joined
Oct 5, 2012
Messages
67
  • Team1 Death Deathmatch
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Not equal to Player 8 (Pink)
          • (Owner of (Triggering unit)) Not equal to Player 9 (Gray)
          • (Owner of (Triggering unit)) Not equal to Player 10 (Light Blue)
          • (Owner of (Triggering unit)) Not equal to Player 11 (Dark Green)
          • (Owner of (Triggering unit)) Not equal to Player 12 (Brown)
          • (Owner of (Triggering unit)) Not equal to Neutral Hostile
          • (Owner of (Triggering unit)) Not equal to Player 7 (Green)
          • (Owner of (Triggering unit)) Not equal to Player 1 (Red)
          • ((Dying unit) is A Hero) Equal to True
          • Teamlife[1] Not equal to 0
          • deathamtch Equal to True
        • Then - Actions
          • Set heromatch[(Player number of (Owner of (Dying unit)))] = True
          • Set Deathmathclevel[(Player number of (Owner of (Dying unit)))] = (Hero level of (Dying unit))
          • Set Slot1[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 1)
          • Set Slot2[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 2)
          • Set Slot3[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 3)
          • Set Slot4[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 4)
          • Set Slot5[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 5)
          • Set Slot6[(Player number of (Owner of (Dying unit)))] = (Item carried by (Dying unit) in slot 6)
          • Unit - Remove (Dying unit) from the game
          • Wait DETH game-time seconds
          • -------- I Removed the Hero switch, because it's allready working. New Hero is revived after this. --------
          • Hero - Set (Last created unit) Hero-level to Deathmathclevel[(Player number of (Owner of (Last created unit)))], Hide level-up graphics
          • Hero - Give Slot1[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Hero - Give Slot2[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Hero - Give Slot3[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Hero - Give Slot4[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Hero - Give Slot5[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Hero - Give Slot6[(Player number of (Owner of (Last created unit)))] to (Last created unit)
          • Camera - Pan camera for (Owner of (Last created unit)) to (Center of Hero Creation NE <gen>) over 1.00 seconds
          • Set heromatch[(Player number of (Owner of (Last created unit)))] = False
          • Set Teamlife[1] = (Teamlife[1] - 1)
          • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Teamlife[1]
        • Else - Actions
          • Do nothing
 
Status
Not open for further replies.
Top