Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Super Global Variable?
 
Author
All times are GMT. The time now is 17:27. Post New Thread    Post A Reply
Doggo120
Mini-Member


Posts: 88
Registered: 10-12


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

Old Post 07-25-13 04:17 #
Doggo120 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Blue Shadow
Member


Posts: 310
Registered: 09-12


No.

Old Post 07-25-13 10:49 #
Blue Shadow is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Krispy
Senior Member


Posts: 1196
Registered: 02-12


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?

Last edited by Krispy on 07-25-13 at 17:40

Old Post 07-25-13 16:12 #
Krispy is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 764
Registered: 07-09


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.

Old Post 07-25-13 16:20 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Doggo120
Mini-Member


Posts: 88
Registered: 10-12


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

Old Post 07-25-13 18:05 #
Doggo120 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Shadow Hog
Forum Regular


Posts: 764
Registered: 07-09


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.

Old Post 07-26-13 15:44 #
Shadow Hog is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1067
Registered: 04-09


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.

Old Post 07-26-13 21:14 #
wesleyjohnson is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Memfis
Forum Spammer


Posts: 5885
Registered: 04-07


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

Old Post 07-26-13 21:21 #
Memfis is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
BloodyAcid
Senior Member


Posts: 1311
Registered: 09-11



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?

Old Post 07-26-13 21:55 #
BloodyAcid is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
Krispy
Senior Member


Posts: 1196
Registered: 02-12



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.

Old Post 07-27-13 00:08 #
Krispy is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
traversd
Forum Regular


Posts: 671
Registered: 01-09


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

Old Post 07-27-13 00:12 #
traversd is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit || Quote
Blue Shadow
Member


Posts: 310
Registered: 09-12



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.

Old Post 07-27-13 01:20 #
Blue Shadow is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11536
Registered: 07-07



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.

Old Post 07-27-13 12:39 #
Gez is online now Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 17:27. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Super Global Variable?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.