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 / Show objectives whaen Tab is pressed

Author
Message
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 19th Mar 2009 23:18
I'm new on scripting , and I made a single line of script to show objectives when Tab is pressed , The line is :
state=0,scankeycodepressed=15:hudshow=obj.,state=1
state=1,scankeycodepressed=15:hudunshow=obj.
(without the lines of making obj. hud of course)
I have 2 questions :
1- Is this line correct?
2- Where to put it to be activated in the game?
Please help.

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 19th Mar 2009 23:53
a little more coding will have to be put into it but its not bad

But you need to specify the path,position,hide,and name. Open weapon.fpi and look at the first line for a reference.


BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 20th Mar 2009 05:38 Edited at: 20th Mar 2009 05:38
I made my objectives display with the O key instead of Tab. Here is my code if you want to compare to yours. This script I named imp_df_l1obj01display.fpi but you can call it whatever.



Hudname, hudunshow, hudshow should have the same name. I also created the TGA hud to display the text in my objectives.

I call this script with a trigger. In the main field I put this script. I place the trigger anywhere in the map I made.
Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 20th Mar 2009 10:46
Quote: "But you need to specify the path,position,hide,and name."

I know how to do that hockeykid , I just didn't now where to put.
Thanks guys for help , nice to meet you.

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 20th Mar 2009 14:21
Place a triggerzone anywhere in your level, and attach your script to it. Your character won't need to be standing in the triggerzone for this to work. It's the same concept as using a triggerzone and the triggerzone checking to see if the player is in it - the zone with your objectives script will check to see if you are pressing the "tab" key and will display the objectives when you are.

In fact, I started a thread about this a while back when I was starting off on this, and if you'd like you can reference that script here:

http://forum.thegamecreators.com/?m=forum_view&t=139591&b=23

Login to post a reply

Server time is: 2024-11-24 21:43:05
Your offset time is: 2024-11-24 21:43:05