Defense Demise of Atlantis

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Wow, I'm glad to hear that. Well, I've recently created anime heroes which are unlockable via scoring a specific amount and it would need this system :D
 

Joccaren

You can change this now in User CP.
Reaction score
54
One Quick Question.
Do you want a player to get X kills in one game, get their rank (Say, 5 kills, servant, 10 kills, lowling) and save just the rank so in the next game they have to get back up to their rank and overtake it for there to be a point to saving (Some games do do this) or, save their kills and their rank for the next game.

I'm thinking it will probably be the later so thats what I've started on, tell me if I'm wrong though.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Oh, I just need an integer variable. Just the number of kills the player did. So the save system would just save an integer variable.
 

Joccaren

You can change this now in User CP.
Reaction score
54
Well, I've done it with an integer and a rank name anyway.
Tell me ur e-mail so I can send it to you, I'm out of space on this forum.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Wow, that is fantastic please send it to [email censored]. Hope the system works smoothly.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
That is odd, I did not recieve the email. Are you sure you sent it to the right address?
 

Joccaren

You can change this now in User CP.
Reaction score
54
Yes. It is in my sent items box and I have not recieved an error messages in the last 21 minutes to suggest it was a wrong address. I also have gmail and it has picked you up as a user. I'll see if I can find and remove some of my attachments and upload it here.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Downloaded the map, it ended up in an error, seems that it is not 1.24 compatible. What save load system did you use?
 

Joccaren

You can change this now in User CP.
Reaction score
54
This:
Trigger:
  • Save
    • Events
      • Player - Player 1 (Red) types a chat message containing -save as An exact match
      • Player - Player 2 (Blue) types a chat message containing -save as An exact match
      • Player - Player 3 (Teal) types a chat message containing -save as An exact match
      • Player - Player 4 (Purple) types a chat message containing -save as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -save as An exact match
      • Player - Player 6 (Orange) types a chat message containing -save as An exact match
      • Player - Player 7 (Green) types a chat message containing -save as An exact match
      • Player - Player 8 (Pink) types a chat message containing -save as An exact match
      • Player - Player 9 (Gray) types a chat message containing -save as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -save as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -save as An exact match
      • Player - Player 12 (Brown) types a chat message containing -save as An exact match
    • Conditions
    • Actions
      • Set SaveString[(Player number of (Triggering player))] = ((Substring(RankName[(Player number of (Triggering player))], (Random integer number between 1 and 3), (Random integer number between 2 and 5))) + ((String((Hero experience of Hero[(Player number of (Triggering player))]))) + ((String(KillsInteger[(Player num
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: Your save code is:
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) for 60.00 seconds the text: SaveString[(Player number of (Triggering player))]
      • Game Cache - Store SaveString[(Player number of (Triggering player))] as (Name of (Triggering player)) of Saves in (Last created game cache)
      • Game Cache - Store RankName[(Player number of (Triggering player))] as (Name of (Triggering player)) of Rank in (Last created game cache)
      • Game Cache - Store KillsInteger[(Player number of (Triggering player))] as (Name of (Triggering player)) of Kills in (Last created game cache)
      • Game Cache - Save (Last created game cache)


To load I used this:
Trigger:
  • Load
    • Events
      • Player - Player 1 (Red) types a chat message containing -load as An exact match
      • Player - Player 2 (Blue) types a chat message containing -load as An exact match
      • Player - Player 3 (Teal) types a chat message containing -load as An exact match
      • Player - Player 4 (Purple) types a chat message containing -load as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -load as An exact match
      • Player - Player 6 (Orange) types a chat message containing -load as An exact match
      • Player - Player 7 (Green) types a chat message containing -load as An exact match
      • Player - Player 8 (Pink) types a chat message containing -load as An exact match
      • Player - Player 9 (Gray) types a chat message containing -load as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -load as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -load as An exact match
      • Player - Player 12 (Brown) types a chat message containing -load as An exact match
    • Conditions
      • HasLoaded[(Player number of (Triggering player))] Equal to False
    • Actions
      • Trigger - Add to Load Two <gen> the event (Player - (Triggering player) types a chat message containing (Load (Name of (Triggering player)) of Saves from (Last created game cache)) as An exact match)
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: Type your code now

and this
Trigger:
  • Load Two
    • Events
    • Conditions
      • HasLoaded[(Player number of (Triggering player))] Equal to False
    • Actions
      • Set KillsInteger[(Player number of (Triggering player))] = (Load (Name of (Triggering player)) of Kills from (Last created game cache))
      • Set RankName[(Player number of (Triggering player))] = (Load (Name of (Triggering player)) of Rank from (Last created game cache))
      • Game - Display to (All players) the text: ((Name of (Triggering player)) + ( has loaded rank + RankName[(Player number of (Triggering player))]))
      • Set HasLoaded[(Player number of (Triggering player))] = True

The last two probably could be merged but, oh well.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Did it work for you? I don't actually know how to use game cache. Maybe aceharts save load would be good.
 

Joccaren

You can change this now in User CP.
Reaction score
54
It worked for me, but I'm not using 1.24

A game cache is needed to move data between maps or load it on a different version of the same map.

To use a game cache, create one at map initialization. In my demo map, I called it 'Atlantis'. this is how I did it:
Trigger:
  • Game Cache
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Create a game cache from Atlantis


Next up, do my save and load triggers. Here is the settin of my variables that I don't set in my save/load triggers:

Trigger:
  • Rank
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set RankName[(Integer A)] = New

Trigger:
  • Set
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set KillsInteger[(Player number of (Owner of (Killing unit)))] = (KillsInteger[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 20
        • Then - Actions
          • Set RankName[(Player number of (Owner of (Killing unit)))] = Noob
          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 40
            • Then - Actions
              • Set RankName[(Player number of (Owner of (Killing unit)))] = Beginner
              • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 60
                • Then - Actions
                  • Set RankName[(Player number of (Owner of (Killing unit)))] = Novice
                  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 80
                    • Then - Actions
                      • Set RankName[(Player number of (Owner of (Killing unit)))] = Average
                      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 100
                        • Then - Actions
                          • Set RankName[(Player number of (Owner of (Killing unit)))] = Above Average
                          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 120
                            • Then - Actions
                              • Set RankName[(Player number of (Owner of (Killing unit)))] = Intermediate
                              • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 140
                                • Then - Actions
                                  • Set RankName[(Player number of (Owner of (Killing unit)))] = Regular
                                  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 160
                                    • Then - Actions
                                      • Set RankName[(Player number of (Owner of (Killing unit)))] = Semi-Pro
                                      • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 180
                                        • Then - Actions
                                          • Set RankName[(Player number of (Owner of (Killing unit)))] = Pro
                                          • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 200
                                            • Then - Actions
                                              • Set RankName[(Player number of (Owner of (Killing unit)))] = Hero
                                              • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • KillsInteger[(Player number of (Owner of (Killing unit)))] Equal to 220
                                                • Then - Actions
                                                  • Set RankName[(Player number of (Owner of (Killing unit)))] = Legend
                                                  • Game - Display to (All players) the text: ((Name of (Owner of (Killing unit))) + ( has ranked up to a + RankName[(Player number of (Owner of (Killing unit)))]))
                                                • Else - Actions

Trigger:
  • Keeper of the Grove
    • Events
      • Unit - A unit comes within 125.00 of Keeper of the Grove 0002 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Wisp
    • Actions
      • Unit - Remove (Triggering unit) from the game
      • Unit - Create 1 Keeper of the Grove for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
      • Set Hero[(Player number of (Owner of (Triggering unit)))] = (Last created unit)


I also used this as a manual command to show the players rank:
Trigger:
  • Display
    • Events
      • Player - Player 1 (Red) types a chat message containing -rank as An exact match
      • Player - Player 2 (Blue) types a chat message containing -rank as An exact match
      • Player - Player 3 (Teal) types a chat message containing -rank as An exact match
      • Player - Player 4 (Purple) types a chat message containing -rank as An exact match
      • Player - Player 6 (Orange) types a chat message containing -rank as An exact match
      • Player - Player 7 (Green) types a chat message containing -rank as An exact match
      • Player - Player 8 (Pink) types a chat message containing -rank as An exact match
      • Player - Player 9 (Gray) types a chat message containing -rank as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -rank as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -rank as An exact match
      • Player - Player 12 (Brown) types a chat message containing -rank as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players matching ((Matching player) Equal to (Triggering player))) the text: (You are ranked as a + RankName[(Player number of (Triggering player))])


Hope that works!
 

Joccaren

You can change this now in User CP.
Reaction score
54
Found the error. Its the 'Save game cache' action. If you wait for Blizzard to release a new patch or find another way to save things, this should work.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Hahaha too bad, well I'll keep the rank system off for the mean time.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
@Sneakster
Thanks, gave me a smile when I saw that post hehehe :D

@Zack1996
Actually I have experimented already with AceHart's I can get it to work, but there are errors when I copy and paste the triggers into my map.

EDIT: Wow, recently reopened the map, I just actually forgot to copy and paste all the JASS code hidden in the custom script code.

EDIT 2: Boom got it working now! Guess I was already to sleepy and brain drained last night to do things properly.

Update:

- Found out that the heroes' have no proper button positions, fixed.

- Basic items are ready to go, just the recipes are on queue.

- New training grounds which could give you something to do while the creeps don't spawn yet.

- Fixed the leak with frost nova, got the code upside down (Destroy effect got first before the effect was even made :D)

- Finally made a formal code for repick, you can now have only a maximum of two repicks.

- Game start is now set to 3 minutes.
 
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