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 image on contact with trigger zone

Author
Message
Markyyy!
15
Years of Service
User Offline
Joined: 1st Sep 2009
Location:
Posted: 1st Sep 2009 14:40
i really need help with a script i was hoping that i would be able to find one all ready on here but they dont seem 2 work dose any 1 have 1 that they know works all it needs to do is display a png or tga file
Bigsnake
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: England
Posted: 1st Sep 2009 18:12
yea, same here. Ive been trying it for months now after seeing this video on youtube

Join the forums and download fpsc games here:
http://fpsc-games.webs.com/
Windows Vista,ATI Readon HD 4870,AMD Athlon 7750 64 Dual Core,4GB ram,SoundBlaster Audigy,EFX Free Edition
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 3rd Sep 2009 04:32
A good way to learn scripting is by examining the stock scripts.
For instance, for this case let's look at the dooruse.fpi in the scriptbank paying attention to the first two lines after the ;Triggers comment...



:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=usedoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=usedoorprompt,hudfadeout=usedoorprompt



...As you can see, state=0 creates the HUD for future display then moves to state=10.

Then, in state=10 we check to see when the player is close with the plrdistwithin=60 condidtion, and if so then we display the HUD with the hudshow=usedoorprompt,hudfadeout=usedoorprompt actions.

And there you have it right in the stock scripts; an example of what you are looking to acomplish.

Good luck and don't forget to include the desc = line in your scripts because they won't work without it.

A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 3rd Sep 2009 14:31
Why is is that all of these scripts always goes to state 10? Whats wrong with state 1? Just sommin that has always puzzled me


WWW.ARENAS4146.WEBS.COM
Bigsnake
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: England
Posted: 3rd Sep 2009 18:30
state 10 pauses the script until its told to anything else im lead to believe


visit home page - http://fpsc.freephpbb3.com/index.php
Windows Vista,ATI Readon HD 4870,AMD Athlon 7750 64 Dual Core,4GB ram
Markyyy!
15
Years of Service
User Offline
Joined: 1st Sep 2009
Location:
Posted: 3rd Sep 2009 19:07
Ah Thanks Conjured Entertainment Absolutely brilliant just a question
can i use png's to displays instead of tga's ?

oh also i take it i can use trigger zones ?

thanks again
A r e n a s
16
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 4th Sep 2009 11:14
Ah, I always wondered that. But dont all scripts just 'loop' along the lines until they are told to move on?


WWW.ARENAS4146.WEBS.COM
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 4th Sep 2009 16:13
I don't have the list of conditions/actions in front of me (and i just know i'm missing stuff), but the script would go something like this:

:plrwithinzone=1:showhud,"Image path + coordinates etc."
:plrwithinzone=0:hidehud

This script will not work, you'll need to check up on the actions, but I can't remember all of them right now. It should give you a pretty good idea though of what you're looking for.

Migration Discussion Thread: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Piracy Discussion Thread:
http://forum.thegamecreators.com/?m=forum_view&t=142774&b=21
Bigsnake
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: England
Posted: 5th Sep 2009 00:18 Edited at: 5th Sep 2009 00:20
Wouldn't it be more like :




visit home page - http://fpsc.freephpbb3.com/index.php
Windows Vista,ATI Readon HD 4870,AMD Athlon 7750 64 Dual Core,4GB ram
Markyyy!
15
Years of Service
User Offline
Joined: 1st Sep 2009
Location:
Posted: 6th Sep 2009 00:14
I dno i the first one worked for me so im happy

Login to post a reply

Server time is: 2024-11-25 06:49:56
Your offset time is: 2024-11-25 06:49:56