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

[Trigger] Simple Difficulty System bug

Status
Not open for further replies.
Level 17
Joined
Dec 11, 2014
Messages
2,004
(Yes I sometimes use GUI too)

This is an extremely simple trigger I've made to use in my ORPG map, that uses upgrades and handicap to raise the difficulty of creeps in harmony with the number of players playing.

  • Difficulty System
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player[(Integer A)] slot status) Equal to (==) Is playing
              • (Player[(Integer A)] controller) Not equal to (!=) None
              • Comment - I know a comment in a condition is dumb
              • Comment - The (Player[(Integer A)] controller) Not equal to (!=) None checks for the computer players too, the map uses ORPG AI.
            • Then - Actions
              • Set Number_of_Players = (Number_of_Players + 1)
            • Else - Actions
      • Set Difficulty = (Real(Number_of_Players))
      • Player - Set Neutral Hostile handicap to (100.00 x Difficulty)%
      • Player - Set the current research level of Attack bonus for creeps to (Integer(Difficulty)) for Neutral Hostile
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
(I Know, IntegerA)

Now the problem:
The creep's maximum hp change to an extremely low max hp i.e normal OE hp is 500, after using this: 5. Is this a problem with the handicap?
 
Level 14
Joined
Nov 30, 2013
Messages
926
For me, the If statement failed to run, thus making the "Number_of_Players" variable remained 0. That's makes the Handicap set to 1%.
Did you try to BJDebug or Gametext at the If statement? I maybe wrong but that's all I can do. Only I can think is the condition might cause it.
 
Level 17
Joined
Dec 11, 2014
Messages
2,004
If you're only identifying which is the Player is being played by a User, not Computer, try this if it works.
  • Conditions
    • ((Player((Integer A))) controller) Equal to User
    • ((Player((Integer A))) slot status) Equal to Is playing

I'm not. The map counts the computer players as an AI, so they should count too.
+ "((Player((Integer A))) slot status) Equal to Is playing" didn't work last time.
 
Status
Not open for further replies.
Top