How to get commands like notarget to behave like variables?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Keyboard_Doomer
Posts: 4
Joined: Thu Feb 13, 2014 7:17 am

How to get commands like notarget to behave like variables?

Post by Keyboard_Doomer »

I'm looking for a way how to make some console commands like notarget or iddqd to behave like some of the variables, e.g. sv_infiniteammo. What I mean is the effect of the cheat would last throughout the current session of ZDoom until I explicitly unset it but the next time I launch ZDoom it will be disabled.

I see ZDoom have the option to create custom variables, though with zero ACS scripting knowledge I can't even begin to imagine how would I make this work.

Any help appreciated.
User avatar
XCVG
Posts: 561
Joined: Fri Aug 09, 2013 12:13 pm

Re: How to get commands like notarget to behave like variabl

Post by XCVG »

I don't think this is possible without editing the source code.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to get commands like notarget to behave like variabl

Post by Gez »

I don't understand the issue. They already work like that, don't they?
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: How to get commands like notarget to behave like variabl

Post by wildweasel »

I imagine he wants them to be on until he specifically turns them off, persisting between game sessions.
Keyboard_Doomer
Posts: 4
Joined: Thu Feb 13, 2014 7:17 am

Re: How to get commands like notarget to behave like variabl

Post by Keyboard_Doomer »

Gez wrote:I don't understand the issue. They already work like that, don't they?
I guess I should've explained more thoroughly what I'm asking for. If you die or change the map you have to run these commands again for them to take effect. Variables like sv_infiniteammo continue to work no matter what until you disable them yourself or restart ZDoom.

EDIT: And by restart I meant close it and then launch it again later. Apparently even using "restart" in console doesn't unset these variables.
User avatar
edward850
Posts: 5904
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: How to get commands like notarget to behave like variabl

Post by edward850 »

This is because the mindset is different between gameplay variables and debug commands. Things like notarget aren't really intended for use in gameplay, but rather development and debugging use, and thus their effects are limited for what they needed to do at the time in the simplest way possible with no real need of session persistence.
Keyboard_Doomer
Posts: 4
Joined: Thu Feb 13, 2014 7:17 am

Re: How to get commands like notarget to behave like variabl

Post by Keyboard_Doomer »

edward850 wrote:This is because the mindset is different between gameplay variables and debug commands. Things like notarget aren't really intended for use in gameplay, but rather development and debugging use, and thus their effects are limited for what they needed to do at the time in the simplest way possible with no real need of session persistence.
I see your point, though I can't really say I would agree. For example sv_nomonsters is a variable, yet I don't see much use for it in gameplay. Also, I haven't made any wads myself but I would imagine notarget can be useful in multi-level wads just as it is in single-level ones with similar usage as the aforementioned sv_nomonsters.
User avatar
edward850
Posts: 5904
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: How to get commands like notarget to behave like variabl

Post by edward850 »

Keyboard_Doomer wrote:For example sv_nomonsters is a variable, yet I don't see much use for it in gameplay.
Did you forget that deathmatch exists? :P
Keyboard_Doomer
Posts: 4
Joined: Thu Feb 13, 2014 7:17 am

Re: How to get commands like notarget to behave like variabl

Post by Keyboard_Doomer »

edward850 wrote:
Keyboard_Doomer wrote:For example sv_nomonsters is a variable, yet I don't see much use for it in gameplay.
Did you forget that deathmatch exists? :P
Heh, true. :oops:

Though, still think that it would be rather useful while testing multi-level wads if commands like notarget, buddha etc. worked like variables.
Post Reply

Return to “General”