Page 1 of 1

acs ingame tutorial

PostPosted: Wed Jul 28, 2021 3:33 pm
by tweaker212
well i was tired of going in and out of gameplay
and so I thought hmm there has to be a easier way
well i found it

i first created these files

then in cvarinfo i put
server noarchive int fl2=0;

then in the action special for floor_lowerbyvalue
it had sector/tag speed and hight
so i thought hmm how can i make this work

heres how

#acs code#
#library "floorhelper"
#include "zcommon.acs"

script "fh1" (void)
int a= getcvar("tag");
int b= getcvar("sp1");
int c = getcvar("ht1");
compiling the script this way will not error out because all the parameters are present only way to adjust the parameters is setting the cvar itself so i then went back into the
cvarinfo.txt i put

server noarchive int tag=0;
server noarchive int sp1=0;
server noarchive int ht1=0;

then in menudef.txt i have this

addoptionmenu optionsmenu
submenu "script helping menu","sandboxmenu"
optionmenu sandboxmenu
title "scripting help"
submenu "script help menu","modmenu1"

optionmenu modmenu1
title "ok which one do u need help with"
submenu "floors","poj1"

optionmenu poj1
title "floor script helper"
statictext"script chooser",gold
option "script:","fl2","poj2"
statictext"variable adjustments",gold
submenu "lowerbyvalue variables","ftl"
statictext"script activation",gold
command "activate script with above variables","summon floortest"

optionvalue poj2

optionmenu ftl
title "floor lowerbyvalue"
statictext"ok adjust what you need"
statictext" in acs its floor_lowerbyvalue(tag,speed,hight)",cyan
textfield "tag:","tag"
textfield "speed:","sp1"
textfield "hight:","ht1"

now to make the script option work u need a decorate actor like so

actor floortest
tnt1 a 2
tnt1 a 0 a_jumpif(fl2== 1,"lower")
tnt1 a 0 50
tnt1 a 0 a_printbold("executing script")
tnt1 a 0 50
tnt1 a 0 acs_namedexecute("fh1",0)
then in the load acs text i put the following


since the cvar is linked to the decorate actor and the other cvars are linked to the scripts you will always get the desired affect you want and execute any script you need to for debugging perposes/testing perposes

horrah for gzdoom!!!!!
may it never die!!!!
rip and tear fellow doomers !!!!
thats a order damit lol

to witness this tutorial in action please visit this YouTube link

hopefully this will inspire someone to create a comprehensive acs scripter helper mod