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

Continues

Status
Not open for further replies.
Level 4
Joined
May 9, 2009
Messages
45
okay this is my trigger for continues that somehow doesnt work, can anyon help?

  • Checkpoint
  • Unit - A unit enters Checkpoint1 <gen>
  • (Unit-type of (Triggering unit)) Equal to Ronin
    • Hero - Add 200 experience to (Entering unit), Show level-up graphics
    • Unit Group - Pick every unit in (Units of type Ronin) and do (Hero - Add 200 experience to (Picked unit), Show level-up graphics)
    • Unit Group - Pick every unit in (Units of type Ronin) and do (Unit - Kill (Picked unit))
    • Wait 2.75 seconds
    • Unit Group - Pick every unit in (Units of type Ronin) and do (Hero - Instantly revive (Picked unit) at (Center of Checkpoint1 <gen>), Hide revival graphics)
    • Set Hero_Count = Playing_Playe
    • Trigger - Turn off (This trigger)
  • Playing Players
  • Time - Elapsed game time is 0.01 seconds
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (((Player((Integer A))) slot status) Not equal to Is playing) then do (Set Playing_Players = -1.00) else do (Do nothing)
  • Hero Count
  • Game - Hero_Count becomes Equal to 0.00
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Continues Greater than 0.00
    • Then - Actions
      • Hero - Instantly revive Ronin 0046 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0047 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0048 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0049 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0050 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0051 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0052 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0053 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0054 <gen> at CurrentCheckpoint, Hide revival graphics
      • Hero - Instantly revive Ronin 0055 <gen> at CurrentCheckpoint, Hide revival graphics
      • Set Hero_Count = Playing_Players
    • Else - Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Game - Defeat (Player((Integer A))) with the message: Defeat!
  • Hero Dies
  • Unit - Ronin 0046 <gen> Dies
  • Set Hero_Count = -1.00
  • Player Leave
  • Player - Player 1 (Red) leaves the game
  • Set Playing_Players = -1.00
  • Unit - Remove Ronin 0046 <gen> from the game
  • Set Up
  • Time - Elapsed game time is 1.00 seconds
  • Set Hero_Count = Playing_Players
Variables= Hero Count=Real 10
Playing Players=Real 10
Continues=Real 3
 
Last edited:
Level 4
Joined
May 4, 2008
Messages
113
I understand what you're trying to do with the "Set Playing_Players = -1.00" but the World Editor doesn't support that method of changing the value of a variable.

Instead use "Set Playing_Players = Playing_Players - 1.00"

The only problem I can see from first glance is "Set Hero_Count = Playing_Playe", where before you have been using "Playing_Players" - I'm not sure if that's just a typo or if it's actually in the World Editor.

Incase you didn't know, you can directly copy triggers using "Copy as Text" if you right click the trigger.

Hope that all helps!

EDIT: Also, "Player Leave" will only work when Player 1 leaves, you might want to add events for every player there, as well.
 
Level 4
Joined
May 9, 2009
Messages
45
The only problem I can see from first glance is "Set Hero_Count = Playing_Playe", where before you have been using "Playing_Players" - I'm not sure if that's just a typo or if it's actually in the World Editor.

EDIT: Also, "Player Leave" will only work when Player 1 leaves, you might want to add events for every player there, as well.

yes i know i did copy as text for all of them but i only copied one of Player leaves and hero dies

and the playing_playe, the r just got deleted by accident when i was copy/pasting

Edit:
i tryed doing that with playing players and it still does not work D=
 
Last edited:
Level 4
Joined
May 4, 2008
Messages
113
Did you use the method I suggested:

"Set Playing_Players = Playing_Players - 1.00"

instead of

"Set Playing_Players = -1.00"

Like you're currently doing?

Make sure Playing_Players also defaults at the maximum number of players your game can have, as well.
 
Level 6
Joined
Oct 26, 2005
Messages
190
I don't understand what you exactly want at all (other that a continue trigger set), so I'll give my general opinion:
First of all, don't use Reals, since you are counting like 1,2,3... Also use Picks and If/then/else action with (Multiple actions) for easiness
I supposse the continues will be equal to the number of players playing, if so, all you need to do is that at Map Initialitation, Pick every player matching ((Matching player) equal to is playing) AND ((Matching player) equal to user) and in that loop you set Playing_Players = Playing_Players + 1. This determines how many user players are curently playing.
Like the user above said, -1 won't substract that amount from the variable, you need change this to.

I hope I helped.
 
Status
Not open for further replies.
Top