Super Global Variable?

Wazzup!

Can I declare a global variable that can hold its value even if I start a new game? I hope the answer is yes.............................. :O

Share this post


Link to post

Could it be possible to set it by giving the actor an inventory piece that he carries from level to level and it also sets the global variable?

Share this post


Link to post

I don't think so. That'd still set the global variable back to a default value at the start of the new game, instead of keeping the value from a prior one.

Share this post


Link to post

Krispy I was thinking the exact same thing!
Maybe with Dehacked or some other tool?

Share this post


Link to post

There is literally no way to have a variable carry over between game sessions. None. Every "New Game" is a new session that will have ALL variables reset to their default values.

Share this post


Link to post

Doom script engines are very careful to initialize everything so it starts from a predictable clean state.

There is one way to carry a token and that is in the players memory.
Give the player a code.

In a later game the code can be input (will have to be inventive here)
to indicate what they have accomplished.
Inputting the code can be done by visiting locations in a control room in a specified order, and perhaps pushing buttons.
This could be required to exit the room, but if the special code is recognized then your new behavior is triggered.

Code example: Blue Red Lower Open
Which would mean push blue button, push red button, goto lower level, open the door.

You could give the player a code by showing them textures one at a time
(perhaps textures of switches and doors).
They then have to find those textures (and perhaps push them) to activate the code later.

Share this post


Link to post

I've heard about malicious wads that fuck up zdoom's settings. So maybe you could theoretically store info in some config parameter?

Share this post


Link to post
Krispy said:

Could it be possible to set it by giving the actor an inventory piece that he carries from level to level and it also sets the global variable?

How about give x amount of inventory as the acting variable and just read it later?

Share this post


Link to post
BloodyAcid said:

How about give x amount of inventory as the acting variable and just read it later?


Exactly. Someone give this guy a cookie.

Share this post


Link to post

Yeh, but the OP wants the value to remain when a new game is started, not just a new map. Or can zdoom retain inventory values between games?

Is there perhaps some gameplay var that can be altered that might carry through a new game process. Skill setting for example (providing you can prevent skill menu from appearing).

Share this post


Link to post
Memfis said:

I've heard about malicious wads that fuck up zdoom's settings. So maybe you could theoretically store info in some config parameter?

Yeah, with mod-defined console variables, you might pull it off.

Share this post


Link to post
Memfis said:

I've heard about malicious wads that fuck up zdoom's settings.

Skulltag/Zandronum settings maybe, because it allows modders access to the console through ACS. ZDoom doesn't.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now