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 / Interaction with objects script

Author
Message
Pazjf
15
Years of Service
User Offline
Joined: 17th Nov 2009
Location:
Posted: 20th Nov 2009 00:44
Hey all, I'm new to scripting and pretty much don't have a clue what I'm doing. I've tried to make a script using pieces of script that come with FPS Creator as examples to teach myself what does what. So here's the goal.

the player approaches an object, for example, a newspaper on a table. When the player is within a certain distance of the object, a HUD image of an eye appears on the screen. If the player presses the action button while in this range, a sound file is played. When the player leaves the range, the eye image disappears.

I haven't made it all yet because I've tried to get just the image part to work so far. Here's what I tried last:



Artificial Intelligence Script

;Header

desc = press enter to play sound

;Triggers

:state=0,hudreset,plrdistwithin=50,hudx=50,hudy=90,hudimagefine=gamecore\huds\eye_focus.dds,hudname=eye,hudhide=1,hudmake=display,plrusingaction=1:activate=2,state=1
:state=1,plrwithinzone=1:state=1,sound=$0,state=2
:state=2,plrdistwithin=50,plrusingaction=1:activate=0,state=3
:state=3,plrdistwithin=60:hudshow=eye,hudfadeout=eye


;End of script

Login to post a reply

Server time is: 2024-11-25 05:52:44
Your offset time is: 2024-11-25 05:52:44