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

3 Life Leaderboard

Status
Not open for further replies.
Level 3
Joined
Oct 3, 2009
Messages
39
I'm making a mini-game map, where you have 3 lives in total. When all lives are used up, the person gets defeated, and his units removed.
Now I'm wondering how to make all this, and put it together in a leaderboard?
Please could someone show me?
 
  • Trigger1
  • Events
    • Time - Elapsed time is 0.00 seconds
  • Conditions
  • Actions
    • Leaderboard - Create a leaderboard for (All players) titled: "Lives"
    • Set Leaderboard = (Last created leaderboard)
    • For each (IntegerA) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Player((Integer A))) slot status) Equal to Is playing
            • ((Player((Integer A))) controller) Equal to User
          • Then - Actions
            • Set Count[Player Number of (Player(IntegerA)] = 3
            • Leaderboard - Add (Player((Integer A))) to (Leaderboard) with label (Name of (Player((Integer A)))) and value Count[Player Number of (Player(IntegerA))]
          • Else - Actions
  • Trigger2
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • Count[Player number of (Owner of (Triggering unit))] Not Equal to 0
      • Then - Actions
        • Set Count[Player Number of (Owner of (Triggering unit))] = (Count[Player Number of (Owner of (Triggering unit))] - 1)
        • Leaderboard - Change the value for (Owner of (Triggering unit)) in Leaderboard to Count[Player number of (Owner of (Triggering unit))]
        • Else - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
              • Unit - Remove (Picked unit) from the game
          • Game - Defeat (Owner of (Triggering unit)) with the message: "Defeat!"
P.S. Since you're asking for trigger generation, this goes to World Editor Help Zone; Triggers and Scripts (Where you reposted it) is a forum to fix triggers.
 
Level 3
Joined
Oct 3, 2009
Messages
39
How do i make Set Count[Player Number of (Player(IntegerA)] = 3 ?
And also the last part in the trigger right below it.
And what is the Count variable? Cause Integer doesn't seem to work.
 
Last edited:
Level 3
Joined
Oct 3, 2009
Messages
39
Really can't find it o_O
Could you DL the map, and make it? And while you're at it, in the trigger under:

Level 2
L1 Creep Death collide

Is it possible to make the unit that you die by getting too close to, is of an unit type or something? As the units I want are getting spawned every 2.4-2.6 secs.
 

Attachments

  • Mini Game.w3x
    34.5 KB · Views: 34
Oh, then do this:
  • Trigger1
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
      • Loop - Actions
        • Trigger - Add to Trigger2 <gen> the event (Unit - A unit comes within 90.00 of (Picked unit))
  • Trigger3
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
  • Actions
    • Trigger - Add to Trigger2 <gen> the event (Unit - A unit comes within 90.00 of (Triggering unit))
  • Trigger2
  • Events
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to X
  • Actions
    • //Actions here
 
Level 3
Joined
Oct 3, 2009
Messages
39
Nice, thanks. But you start at 0 lives in leaderboard, I just realised.
And is it possible to remove the corpse from the dying goblin things instantly? as the corpses also seem to kill.
 
Level 3
Joined
Oct 3, 2009
Messages
39
Lol, embarasing.. The map somehow got lost.. Somehow.. Well..
Could you redo the Leaderboard and Collide triggers? Btw, you are so awesome lol. Why don't you just make my map for me? xD Also, you might not have this problem. But when I try to import something, it closes the World Editor. Could you test that on your computer, with the map open. Then I'll know what to do to fix.
 

Attachments

  • Mini Game.w3x
    35.6 KB · Views: 49
Lol, embarasing.. The map somehow got lost.. Somehow.. Well..
Could you redo the Leaderboard and Collide triggers? Btw, you are so awesome lol. Why don't you just make my map for me? xD Also, you might not have this problem. But when I try to import something, it closes the World Editor. Could you test that on your computer, with the map open. Then I'll know what to do to fix.

I am sorry, but do I look like some kind of stooge? I already sent you the map with the triggers it should have and you keep sending back the old map. Go to the map I sent you, right click the triggers, copy and paste them into your map.
 
Status
Not open for further replies.
Top