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

Code for HoC

Status
Not open for further replies.
Level 5
Joined
Aug 8, 2007
Messages
112
I am in need of a system (not near any Save/Load or whatever system)which can save simply an integer to a player name. I need to save a player's BP (Battle Points) into a Variable and save it so that it can be loaded once the player is playing again.

If this is similar to any Save/Load code, I am sorry, I could not find one.

This is a small request from a person not so familiar with these types of systems, please help me.

PiCk
 

.KC

.KC

Level 8
Joined
Dec 10, 2007
Messages
118
How can you say this is a small request if you dont know how to do?? But yes it is a small request.

What you need is a Save/Load. If you tell me what the max lenght of the integer in the variables is, and the max player. I maybe could do this for you
 
Level 5
Joined
Aug 8, 2007
Messages
112
EDIT: Nevermind, I fixed it. Thanks a lot! Going to test it now!

EDIT*2: It seems you cannot load when restarting a game. You can only load if you saved in the sae game. eg. If I save, I cannot load if I make a new game, I can only load in the same game I saved in.

HELP ON THIS PLZ?!
 
Last edited:
Level 5
Joined
Aug 8, 2007
Messages
112
No it doesn't, maybe only for player 1 yes

EDIT: Could anybody or madcat2 please tell me what is wrong. Only works for Player 1 and you have to be the same player to load your code. I need something where you save, it saves the BP to your name. You can be any player even if you weren't that player when you saved. Do you mind redoing it this way? At the moment it is really not working. BTW, would this trigger (my BP earning system) affect the saving:

  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • Set Battlepoints[(Player number of (Owner of (Killing unit)))] = (Battlepoints[(Player number of (Owner of (Killing unit)))] + 225)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Killing unit) is A Hero) Equal to False
            • Then - Actions
              • Set Battlepoints[(Player number of (Owner of (Dying unit)))] = (Battlepoints[(Player number of (Owner of (Dying unit)))] - 800)
            • Else - Actions
              • Set Battlepoints[(Player number of (Owner of (Dying unit)))] = (Battlepoints[(Player number of (Owner of (Dying unit)))] - 250)
          • Set Battlepoints[(Player number of (Owner of (Dying unit)))] = (Battlepoints[(Player number of (Owner of (Dying unit)))] - 250)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to False
          • ((Dying unit) is A structure) Equal to False
        • Then - Actions
          • Set Battlepoints[(Player number of (Owner of (Killing unit)))] = (Battlepoints[(Player number of (Owner of (Killing unit)))] + 15)
          • Set Battlepoints[(Player number of (Owner of (Dying unit)))] = (Battlepoints[(Player number of (Owner of (Dying unit)))] - 25)
        • Else - Actions
And also this to show BP, I think when you load it becomes "Value", the way you set it?

  • ShowBP
    • Events
      • Player - Player 1 (Red) types a chat message containing -bp as An exact match
      • Player - Player 2 (Blue) types a chat message containing -bp as An exact match
      • Player - Player 3 (Teal) types a chat message containing -bp as An exact match
      • Player - Player 4 (Purple) types a chat message containing -bp as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -bp as An exact match
      • Player - Player 6 (Orange) types a chat message containing -bp as An exact match
      • Player - Player 8 (Pink) types a chat message containing -bp as An exact match
      • Player - Player 9 (Gray) types a chat message containing -bp as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -bp as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -bp as An exact match
      • Player - Player 12 (Brown) types a chat message containing -bp as An exact match
    • Conditions
    • Actions
      • Game - Display to (Player group((Triggering player))) for 25.00 seconds the text: -------------------...
      • Game - Display to (Player group((Triggering player))) for 25.00 seconds the text: (Your current BP is: |c0080FF80 + (String(Battlepoints[(Player number of (Triggering player))])))
      • Game - Display to (Player group((Triggering player))) for 25.00 seconds the text: -------------------...
 
Last edited:
Status
Not open for further replies.
Top