Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / Need help with triggerzone...

Author
Message
Mr Love
14
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 28th Dec 2016 19:12
This script works fine, but I dont want to activate this script before I have been inside another triggerzone. How can I do that? I keep trying but some help wourld be fine!


:state=0:dimvar=timecounter
:state=0:hudreset,hudx=50,hudy=5,hudsize=22,hudfont=verdana,hudtext=Time Left,hudname=timeleft,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=10,hudsizex=24,hudsizey=24,hudimagefine=gamecore\huds\numeric2.dds,hudtype=6,huduservar=timecounter,hudname=timecounter,hudhide=1,hudmake=numeric
:state=0:state=1

:activated=1:hudunshow=timeleft,hudunshow=timecounter,destroy

:state=1,plrwithinzone=1:state=2
:state=2:hudshow=timeleft,state=3
:state=3:setvar=timecounter 20,state=4,hudshow=timecounter
:state=4:etimerstart,state=5
:state=5,etimergreater=1000:state=6
:state=6:subvar=timecounter 1,state=7
:state=7,vargreater=timecounter 0:state=4
:state=7,varless=timecounter 1:newgame
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Dec 2016 23:13
Mr Love
Not hard to do. But I see you have an "activated" in there already?
To do this simple, Place a triggerzone (the one that will activate this one)
Main script you know "plrinzoneactivateused.fpi" Put name of script
you want to activate in "if used" field.
Next, script to be activated (same name) use this script in the "Start AI" field,
not the "Main AI" Trigger will ot appear until activated.

Now you have to change script above, I remember a Trigger to stop/kill timer
Change activated=1 to activated=2. Your trigger that stops the timer change to "activatedifused=2"

My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
14
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 29th Dec 2016 23:14
Ok, I made it work. Kind of... Is it possible to add some other commandos than "newgame"? I tried "plrsound" instead and when counted down to "0" the counter shows the numer "11" and a weird sound plays constant.. By the way activated=2 didnt work for Me, I used activated=1 and it did work fine...
Thanks!
ncmako
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Dec 2016 10:52 Edited at: 30th Dec 2016 10:55
Mr Love
Quote: " By the way activated=2 didnt work for Me, used activated=1 and it did work fine..."

Sorry about that. Glad you figured it out though. Yeah sometimes I'm thinking of another situation and I make
mistakes when I don't test it properly. Happy you go it
Quote: "Is it possible to add some other commandos than "newgame"?"

Yes, if the "timer" hit's zero (:state=7,varless=timecounter 1) instead of "newgame" take it to another "state"
like 8 or higher. But first unshow hud & timer like this.

Use "newgame" when your ready.

Note: Lets keep script Q's in script forum before a mod say's something
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
14
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 30th Dec 2016 19:43 Edited at: 31st Dec 2016 00:02
Have some problem with the HeroPoints, I wanted to give 25 heropoints but instead it just counts. Whats the problem with My script???


:state=0:hudreset,hudx=50,hudy=50,hudsize=24,hudtext= You Collected 25 Hero Points,hudname=25point,hudhide=1,hudmake=display,state=1
:state=1:addvar=hpcounter 25,activateifused=5

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-06-17 02:51:21
Your offset time is: 2019-06-17 02:51:21