[ACS] ENTER and OPEN script variants
Moderator: GZDoom Developers
[ACS] ENTER and OPEN script variants
How feasible is it to implement variants of OPEN and ENTER scripts that run EVERY time the level is loaded (ie from saved games AND player starts), instead of just the first time?
I've worked on a couple of mods where being able to display stats and info to the player upon reloading a save would have been most helpful, but no mechanism exists within the engine to allow this AFAIK.
I've worked on a couple of mods where being able to display stats and info to the player upon reloading a save would have been most helpful, but no mechanism exists within the engine to allow this AFAIK.
Re: [ACS] ENTER and OPEN script variants
This sounds like a good idea. You could have a new script type called LOAD or LOADGAME, and maybe a matching one for saving (SAVE/SAVEGAME).
Re: [ACS] ENTER and OPEN script variants
And set it to kill the player whenever they try to save, thereby effectively allowing the request from the other thread...HotWax wrote:and maybe a matching one for saving (SAVE/SAVEGAME).
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: [ACS] ENTER and OPEN script variants
Boo. Hoo.
Honestly, many feature requests here can already be abused against the user, so this paranoia is completely dumbfounded.
That's why you can at least check the wads before you play.
Honestly, many feature requests here can already be abused against the user, so this paranoia is completely dumbfounded.
That's why you can at least check the wads before you play.

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [ACS] ENTER and OPEN script variants
A script that's run upon loading can be done.
A script that's run upon saving is out of the question, not only for the abuse mentioned here but also for technical reasons.
A script that's run upon saving is out of the question, not only for the abuse mentioned here but also for technical reasons.
Re: [ACS] ENTER and OPEN script variants
The request was for the loading script only, so that is of no consequence as far as I'm concerned. 

Re: [ACS] ENTER and OPEN script variants
Code: Select all
script 1 LOADGAME {
print(s:"Trying to load your saved game, huh? I don't think so!");
Thing_Destroy(playerTID,1);
Thing_Damage(playerTID, 10000, 0); // just in case you have God mode.
}
Re: [ACS] ENTER and OPEN script variants
Indeed, it makes sense.
Ironically, however, if someone did implement a script such as posted above, it would be harder for an end user to circumvent compared to a mapinfo option for no saving.
Ironically, however, if someone did implement a script such as posted above, it would be harder for an end user to circumvent compared to a mapinfo option for no saving.
Re: [ACS] ENTER and OPEN script variants
^? isn't made significantly harder by this script, no. 

Re: [ACS] ENTER and OPEN script variants
I think the LOADGAME block should be restricted - to only re-enable HUD items, or other uses that someone can think of. No variables that "track" the fact the game has just been loaded would be saved, and any other attempted functions would be blocked. The code would be audited by the loadgame code itself, so that you don't have to go through each and every ACS function to detect whether the game has just been loaded. Similar to the method used by the KEYCONF code, which checks each and every command and only allows certain commands to pass.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [ACS] ENTER and OPEN script variants
Not possible.
Re: [ACS] ENTER and OPEN script variants
I think its like one of those things where you can abuse it, but as soon as you did, it would make your mod extremely unpopular. Under no circumstances would I think anybody would uses this to kill a player or anything that would dramatically change the game in any-way because you loaded your game.
- Surreal Doomer
- Posts: 125
- Joined: Thu Jun 12, 2008 7:02 am
Re: [ACS] ENTER and OPEN script variants
This sounds a lot like LOADACS.
Re: [ACS] ENTER and OPEN script variants
You sound a lot like you haven't actually read this thread. 

- Surreal Doomer
- Posts: 125
- Joined: Thu Jun 12, 2008 7:02 am
Re: [ACS] ENTER and OPEN script variants
I fail. I missed the savegame part.