Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detecting player loading a savegame possible?
Detecting player loading a savegame possible?
Jul 13 2009, 6:55 am
By: TF-  

Jul 13 2009, 6:55 am TF- Post #1

🤙🏾

Basically I need to figure out somehow when the player loads a savegame of my map, so I can do stuff like restart the music since it stops.
Can it be done??



🤙🏾

Jul 13 2009, 7:24 am Kaias Post #2



This is actually an interesting question. As far as I'm aware there isn't any way to detect the players loading the game even by EUDs. The saving is designed to resume the game as if the play through had been completely continuous. Essentially- No.



None.

Jul 13 2009, 2:03 pm Roy Post #3

An artist's depiction of an Extended Unit Death

Quote from Kaias
As far as I'm aware there isn't any way to detect the players loading the game even by EUDs.
There has to be changes in memory for saved games. At the victory/defeat for saved games it disables the "Save Replay," meaning it detects that the game was resumed from a save at some point. I would imagine that it could be done using extended players.

Today's my birthday...




Jul 13 2009, 2:47 pm Morphling Post #4



Deaths("Player 12", "ID:22297", Exactly, 1702257011);

or

Memory(267575, Exactly, 1702257011);

Both do the same thing. They detect when the current map you are playing is in the saved folder. I detected the string "save" in the current file path of the map which is "C:\Program_Files\Starcraft\maps\save".



Happy B-day Roy!

Post has been edited 1 time(s), last time on Jul 13 2009, 2:53 pm by Morphling.



None.

Jul 13 2009, 5:14 pm Kaias Post #5



Quote from Morphling
I detected the string "save" in the current file path of the map which is "C:\Program_Files\Starcraft\maps\save".
Ah yes, of course.



None.

Jul 13 2009, 6:05 pm ForTheSwarm Post #6



What if the save file is in a different file path?



None.

Jul 13 2009, 6:21 pm Morphling Post #7



Where would it go? When you save a map it goes there.



None.

Jul 13 2009, 6:24 pm ForTheSwarm Post #8



You can move the savefile manually.



None.

Jul 13 2009, 6:28 pm Morphling Post #9



You could detect the "mlx" at the end of the file name, however the address would vary because the length of the previous part of the path.



None.

Jul 13 2009, 8:11 pm Psionic_Storm Post #10



When you load a game, every wait action that was in progress at the moment of saving will be set to 0.
You might want to try using this somehow.

If you only need to detect loading for the purpose you mentioned, you should just play the music loop and put the appropriate wait after it, instead of using a death counter.

Post has been edited 1 time(s), last time on Jul 13 2009, 8:18 pm by Psionic_Storm.



None.

Jul 14 2009, 1:54 pm TF- Post #11

🤙🏾

About the EUD solution, I can't get it to compile in SCMDraft, says it expects a unit and I think the "ID:22297" part is the problem.

And the Wait solution, I could probably do that, can Wait handle a 5:18 song though?


Thanks for the replies so far.



🤙🏾

Jul 14 2009, 2:01 pm Morphling Post #12



The ID:#### isn't compatable with the text editor. The memory condition does work correctly with it, however you need to download the attached file below which is the updated trigedit(text editor). Go to the location you saved scmdraft, open up the folder plugins, delete the current trigedit.sdp and replace it with the new one you just downloaded. Now, the memory condition should work.

Note, it you're using the condition, "Deaths" Scmdraft will change it to memory if the player is 13 or above(current player). To prevent this change the unit first then the player, since it has to be Terran Marine to change to, "Memory" in addition to the high player number.
Edit: Removed attachment.

Post has been edited 1 time(s), last time on Jul 14 2009, 2:48 pm by Morphling.



None.

Jul 14 2009, 2:21 pm TF- Post #13

🤙🏾

I just did that but the trigger doesn't seem to run on load, I'm using the Memory condition now.



🤙🏾

Jul 14 2009, 2:23 pm Morphling Post #14



What do you mean, "doesn't run on load"? Do you mean, when you start the map it doesn't work?



None.

Jul 14 2009, 2:26 pm TF- Post #15

🤙🏾

I mean I start the map, then save, then load the save but the Memory trigger that should reset the music doesn't run.



🤙🏾

Jul 14 2009, 2:27 pm Morphling Post #16



Could you possibly post the map?



None.

Jul 14 2009, 2:36 pm TF- Post #17

🤙🏾

I'd really rather not :(
Here's a snapshot of the relevant triggers from classic trigedit at least, the normal music reset trigger and the EUD one.



And the EUD trigger in text

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Memory(267575, Exactly, 1702257011);

Actions:
Set Deaths("Player 1", "Ursadon (Ice World)", Set To, 0);
Preserve Trigger();
Display Text Message(Always Display, "detect");
}

//-----------------------------------------------------------------//



🤙🏾

Jul 14 2009, 2:47 pm Morphling Post #18



I must have givin you the wrong trigedit file or you didn't replace the old one because it should say memory in classic editor and not have an unknown. Here is the one in my plugins folder. So it should work.

Attachments:
TrigEdit.sdp
Hits: 4 Size: 300kb



None.

Jul 14 2009, 3:04 pm TF- Post #19

🤙🏾

It's wierd, I definitely have that updated .sdp or it wouldn't let me compile with a Memory instruction in there (it didn't before)
Could i be missing another file?



🤙🏾

Jul 14 2009, 3:07 pm Morphling Post #20



Download this and replace the old scmdraft. http://www.stormcoast-fortress.net/temp/Scmdraft2-setup.rar
I'm not sure if this updated Scmdraft comes with the newest trigedit so you might have to replace it again. :><:



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: jun3hong, Oh_Man