Enemy health based on players playing, help

Solu9

You can change this now in User CP.
Reaction score
216
In my map enemies will get more health the more players are playing.
Ex. If two players are playing the enemies will have 200% Hp and so forth up to 400% at 4 players.
I can't test if it works myself so I will post my triggers for you to go through to see if they do what I want them to.

There is a trigger just like this one for all four players.

Trigger:
  • Player 1 is playing
    • Events
      • Map initialization
    • Conditions
      • (Player 1 (Red) slot status) Equal to Is playing
    • Actions
      • Set Count_Players = (Count_Players + 1)


Trigger:
  • Count Players
    • Events
      • Map initialization
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Count_Players Equal to 1
        • Then - Actions
          • Do nothing
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Count_Players Equal to 2
            • Then - Actions
              • Player - Set Neutral Hostile handicap to 200.00%
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Count_Players Equal to 3
                • Then - Actions
                  • Player - Set Neutral Hostile handicap to 300.00%
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Count_Players Equal to 4
                    • Then - Actions
                      • Player - Set Neutral Hostile handicap to 400.00%
                    • Else - Actions


Will this work as I want it to? And if there is a better way please let me know.

Thanks in advance.
 

PrisonLove

Hard Realist
Reaction score
78
You should use an arithmetic function intead of if statement.



So:
Count_Players = Pick Every Player in (Players Playing) and do actions (Count_Players = Count_Players + 1)
set handicap to (Count_Players*100)%

Something like that. This way you have one, short trigger.

That should work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top