This script utilizes Ply's Mod 1.08. The functions of the script itself works fine, but the interface is a little glitchy. Here are both scripts. It depends on the 'cash' variable, which is applied through a different script. (Which I don't need help with, as like I said, only the graphical stuff is glitchy)
;Artificial Intelligence Script
;Header
desc = Beginner's Shop (Ingram, LMG23, AT9mm)
;Triggers
;///Makes the HUDs, branches out to different shops\\\
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\shop.dds,hudname=shop,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\shopdone.dds,hudname=shopdone,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\shoperror.dds,hudname=shoperror,hudhide=1,hudmake=display
:state=0,plrdistwithin=125:state=1
:state=1,plrdistwithin=125:hudshow=shop,state=3
:state=3,scancodekeypressed=79:state=4
:state=3,scancodekeypressed=80:state=5
:state=3,scancodekeypressed=81:state=6
:state=3,scancodekeypressed=75:hudfadeout=shop
:state=4,vargreater=cash 1000:subvar=cash 1000,giveweap=mp6\Ingram,hudfadeout=shop,hudshow=shopdone,state=7
:state=4,varless=cash 999:state=8,hudfadeout=shop,hudshow=shoperror
:state=5,vargreater=cash 400:subvar=cash 400,giveweap=mp6\AT9mm,hudfadeout=shop,hudshow=shopdone,state=7
:state=5,varless=cash 399:state=8,hudfadeout=shop,hudshow=shoperror
:state=6,vargreater=cash 2500:subvar=cash 2500,giveweap=mp6\LMG23,hudfadeout=shop,hudshow=shopdone,state=7
:state=6,varless=cash 2499:state=8,hudfadeout=shop,hudshow=shoperror
;///Successful Purchase\\\
:state=7,scancodekeypressed=28:timerstart,state=9
:state=9,timergreater=200:hudfadeout=shopdone,state=1
;///Error Screen\\\
:state=8,scancodekeypressed=28:state=10,timerstart
:state=10,timergreater=200:hudfadeout=shoperror,state=1
;End of Script
^^^
Is there any way to fix the HUDs from stacking? They fade out, but that 0.5 of a second where it stacks is confusing.
;Artificial Intelligence Script
;Header
desc = Silencer Shop
;Triggers
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\shoptut.dds,hudname=tutorial,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\silencershop.dds,hudname=sshop,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\silencerselect.dds,hudname=sshop2,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\silencererror.dds,hudname=serror,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\shopdone.dds,hudname=shopdone,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\shoperror.dds,hudname=shoperror,hudhide=1,hudmake=display
:state=0:hudshow=tutorial,timerstart,state=1
:always,plrdistfurther=125:hudfadeout=sshop,hudfadeout=sshop2,hudfadeout=shopdone,hudfadeout=shoperror,hudfadeout=serror
:state=1,timergreater=500,scancodekeypressed=28:hudfadeout=tutorial,state=20
:state=20,plrdistwithin=125:hudshow=sshop,state=2
:state=2,scancodekeypressed=28:hudfadeout=sshop,hudshow=sshop2,state=3
:state=3,scancodekeypressed=79:state=4
:state=3,scancodekeypressed=80:state=5
:state=3,scancodekeypressed=81:state=6
:state=3,scancodekeypressed=75:state=7
:state=4,weaponininv=mp6\Ingram 1,vargreater=cash 100:replaceweap=mp6\Ingram mp6\Ingram-Sup,subvar=cash 100,state=10,hudfadeout=sshop,hudshow=shopdone,timerstart
:state=4,weaponininv=mp6\Ingram 0:hudfadeout=sshop2,hudshow=serror,timerstart,state=12
:state=4,weaponininv=mp6\Ingram 1,varless=cash 99:hudfadeout=sshop2,hudshow=shoperror,state=11,timerstart
:state=5,weaponininv=mp6\AT9mm 1,vargreater=cash 50:replaceweap=mp6\AT9mm mp6\AT9mm-Sup,subvar=cash 100,state=10,hudfadeout=sshop,hudshow=shopdone,timerstart
:state=5,weaponininv=mp6\AT9mm 0:hudfadeout=sshop2,hudshow=serror,timerstart,state=12
:state=5,weaponininv=mp6\AT9mm 1,varless=cash 49:hudfadeout=sshop2,hudshow=shoperror,state=11,timerstart
:state=6,weaponininv=mp6\MP5K 1,vargreater=cash 100:replaceweap=mp6\MP5K mp6\MP5K-Sup,subvar=cash 100,state=10,hudfadeout=sshop,hudshow=shopdone,timerstart
:state=6,weaponininv=mp6\MP5K 0:hudfadeout=sshop2,hudshow=serror,timerstart,state=12
:state=6,weaponininv=mp6\MP5K 1,varless=cash 99:hudfadeout=sshop2,hudshow=shoperror,state=11,timerstart
:state=7:hudfadeout=sshop2,state=1
:state=10,timergreater=250:hudfadeout=shopdone,state=1
:state=11,timergreater=250:hudfadeout=shoperror,state=1
:state=12,tiemrgreater=250:hudfadeout=serror,state=1
;End of Script
It functions fine, but there are a few graphical glitches. For example, I don't want the 'tutorial' HUD to appear more then once (which it did for some reason...), and sometimes when I walk up to the entity that's using this script, the HUD appears for a split-second, then disappears.
On a side note, let's say I make a script that has a variable, and place it in level 3. Can I still read that variable through another script in another map? (They would still be in the same built game of course.)
Scrabble is not my thing. X_X