ACS and LINEDEF Thing

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

ACS and LINEDEF Thing

Post by HellBlade64 »

Fantastic wording you got there, sport!

Bashing my own words aside, I'm currently working on the next version of a mod I've been developing on and off for... I dunno, I think it's been five, maybe six years now?
Anyways, I couldn't decide where (which sub forum) to post this in because the questions I have both kind of fall under ACS\Map Scripting so here we go.

#1: Script Stripping?
I only recently noticed this when looking at the automap in game.
There's a LINEDEF that triggers the display of an image and also plays a sound in accompaniment.

This one!
Spoiler:
Though you'll quickly notice (like I did) that the other linedefs to it's left and right are also programmed to trigger the same script.

So now the issue presents itself.
You can trip one, and it will activate the script.
But the others will remain untouched and if tripped will also call the script.
So how (if at all) can I set it so when on line is tripped...
Spoiler:
the others can't be?

Could I possibly have the called script remove the script call functions of the untouched lines?



#2: Set what?

I am not the most skilled when it comes to using scripts to mess with CVARs.
Ever since I started solely focusing on developing this mod with GZDoom in mind, I've been trying to find a suitable replacement for the script call "ConsoleCommand". That's how I originally got sounds to play (lazy, I know).
I thought I had found a replacement in "SetCVAR"...
but none of my attempts to get it to work when and how I want have been in vain.

This is the complete script file containing these calls,
originally they were included in the map's script lump but I soon after put them in global acs.
I doubt it makes any difference, but I'm open to being wrong.
Spoiler:
Any and all help is welcome.
Cheers!
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: ACS and LINEDEF Thing

Post by Blue Shadow »

HellBlade64 wrote:Could I possibly have the called script remove the script call functions of the untouched lines?
Yes, by calling [wiki=SetLineSpecial]SetLineSpecial[/wiki], setting the special parameter to 0.
Ever since I started solely focusing on developing this mod with GZDoom in mind, I've been trying to find a suitable replacement for the script call "ConsoleCommand". That's how I originally got sounds to play (lazy, I know).
I thought I had found a replacement in "SetCVAR"...
but none of my attempts to get it to work when and how I want have been in vain.
GZDoom doesn't allow mods to change engine's console variables. So no, there isn't a replacement for ConsoleCommand.
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: ACS and LINEDEF Thing

Post by HellBlade64 »

Thanks for your help!

Uhm, so about the second one..

I'm specifically trying to disable jumping, crouching, crosshairs, hud control and the automap.
I can't remember, but I think some of that can be done through either GAMEINFO or KEYCONF.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: ACS and LINEDEF Thing

Post by Blue Shadow »

HellBlade64 wrote:I'm specifically trying to disable jumping, crouching, crosshairs, hud control and the automap.
From those, you can only disable jumping and crouching, and that's done through [wiki=Map_definition#NoJump]MAPINFO[/wiki].
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: ACS and LINEDEF Thing

Post by HellBlade64 »

If a script isn't allowed to modify console variables, why even bother including it as a script function?
Or better yet, WHY does GZDoom disallow mods to modify CVars?
I'm not angry, I'm genuinely confused.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: ACS and LINEDEF Thing

Post by Arctangent »

HellBlade64 wrote:If a script isn't allowed to modify console variables, why even bother including it as a script function?
Because cvars can be modified by scripts - just, as the [wiki]SetCVar[/wiki] page points out, only mod-added cvars defined through [wiki]CVARINFO[/wiki].
HellBlade64 wrote:Or better yet, WHY does GZDoom disallow mods to modify CVars?
TerryWADs are a fantastic example of what happens when you allow modders to fuck with player settings with zero restrictions.

Not that I recommend you experiencing them for yourselves. I don't think you'd actually enjoy having to rebind all your keys or fix all your graphic settings and stuff like that.
User avatar
HellBlade64
Posts: 48
Joined: Tue May 13, 2014 3:00 pm

Re: ACS and LINEDEF Thing

Post by HellBlade64 »

I have experienced and even made Terry WADs like that in the past, never bothered me because I always keep a backup.
Even if I didn't keep a backup of my binds, they aren't exactly complex or annoying to set up.
Dunno, just saying.
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

Re: ACS and LINEDEF Thing

Post by TheMightyHeracross »

...why would you make a Terry wad?

It's easy to say you don't care about mods fucking with players' binds and settings when you're the one making mods like that in the first place. But nobody wants to unknowingly download a mod that messes up their settings, it's super annoying and very unfunny.

Return to “Scripting”