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 Scripts / Image FLASH for a second or two

Author
Message
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 23rd Nov 2017 00:33
I am trying to do a script where an image appears for a second or two when the player is in the trigger zone and then is destroyed.

;Artificial Intelligence Script
;Header
desc = Image
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\monster1.tga,hudname=trans1,hudhide=1,hudmake=display,
state=1
:state=1,plrwithinzone=1:hudshow=trans1,state=2
:state=2,plrwithinzone=0:hudunshow=trans1,state=1
;End of Script

Not working

Thanks!
Mr Love
19
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 23rd Nov 2017 01:26
Im not sure, but I think You need the commando "etimerstart" and "etimergreater" beetwen state=1 and state=2. The commando decide how long You want the picture shown...
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 27th Nov 2017 17:11
Still stuck.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Nov 2017 00:34
@ morphosis comics Hey, your trying at least And that's a good thing. Just don't give up
You almost got it, there is just an extra "state=1" in the script for some reason ? That's probably where the problem lies
Now if you want a "quick pop up " picture let's make it show for about a half second (timers are in milliseconds so 500 is half a second & 1000 is a full second)


Now if the picture flashes too fast, adjust the timer to maybe 1 sec (etimergreater=1000) and it will show for one second.
You get the gist of it
best
My games never have bugs. They just develop random features..
Lots and lots of random features...
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 6th Dec 2017 00:36
Still not working. hmmmm

;Artificial Intelligence Script
;Header
desc = Image
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\monster1.tga,hudname=trans1,hudhide=1,hudmake=display,
:state=1,plrwithinzone=1:hudshow=trans1,etimerstart,state=2
:state=2,etimergreater=1000:hudunshow=trans1
;End of Script
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 6th Dec 2017 00:57
This works but I need it to vanish faster

;Artificial Intelligence Script

;Header

desc = Monster Face

;Triggers

:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\huds\monster1.tga,hudname=itemprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\monster1wav,hudshow=itemprompt,hudfadeout=itemprompt
:state=1:rundecal=2

;End of Script
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 6th Dec 2017 01:54 Edited at: 6th Dec 2017 10:23
morphosis comics Ah yes, I noticed a small typo I made in my first script, was in a rush
Here, this will work fine, tested. I forgot to add the "state=1" at the end on the first line. So it never carried over to next state (next line of code)


Quote: "This works but I need it to vanish faster"

That's because your using the "hudfadeout" command, that will fade out the hud slowly, it's meant for displaying text or pic's for a short period, then fadeout.
Also, if you look at your second line of code you'll see "plrdistwithin" command, that's meant for when the player is within a certain distance.
You wanted to use a triggerzone so it will activate as soon as player hit's the zone, so use the "plrwithinzone" command (that's instantly)
I set the timer to a half second "etimergreater=500" adjust more or less to meet your needs
My games never have bugs. They just develop random features..
Lots and lots of random features...
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 8th Dec 2017 00:51
Thanks ncmako, I'll check into it.
morphosis comics
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 27th Dec 2017 22:00
Awesome Thanks!

Login to post a reply

Server time is: 2024-11-21 13:08:57
Your offset time is: 2024-11-21 13:08:57