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 Overlays

Author
Message
BluTank24
17
Years of Service
User Offline
Joined: 29th Jun 2007
Location:
Posted: 30th Jun 2007 03:45
Hey guys.

I've seen some levels out there with images and pictures taht apear at the bottom of the screen when a player walks in a certian area. I'm pretty sure its done with scripts and a trigger zone. Can anyone run me threw how to get an image to overlay at the bottom of the screen?

-BluTank24

BluTank24 - Red Eye Games.
mastershake 354
17
Years of Service
User Offline
Joined: 3rd Jan 2007
Location:
Posted: 30th Jun 2007 06:52 Edited at: 30th Jun 2007 06:53
Here is something from the boards


Quote: "Display message in HUD
http://forum.thegamecreators.com/?m=forum_view&t=63144&b=23

by Conjured Entertainment

Here's how I do it.
You can open NotePad and paste this in.
Then name it whatever you want, just remember to change the extension to FPI, and put it in the scriptbank.

;Artificial Intelligence Script

;Header

desc = My Own HUD

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecoretextmyownhud.tga,hudname=myownhud,hudhide=1,hudmake=display,state=1
:state=1,plrwithinzone=1:hudshow=myownhud,state=2
:state=2,plrwithinzone=0:hudunshow=myownhud,state=1


;End of Script



Here's what's going on.

state=0

This is the initial state where we create the HUD to display.
hudx and hudy are the coordinates to position it (depends on image size and where you want it)
hudimagefine=gamecoretextmyownhud.tga is the path to your custom "text-image" (your message in a picture)
hudname=myownhud is what we name it (myownhud)
the rest hides the hud, creates it, and sets the state to state=1.


state=1 This waits until we're in the zone, then reveals our message.

plrwithinzone=1 is a condition (1 means we're in the trigger zone)
hudshow=myownhud action that reveals our text message hud when condition is met
state=2 sets the next state


state=2 This hides the message when we leave the zone.

plrwithinzone=0 is a condition (0 means we're not in the trigger zone)
hudunshow=myownhud action that hides our text message hud when condition is met
state=1 returns us to state 1 to check for player re-entering triggerzone (loop)


In this example we named our Hud (TGA) "myownhud" as well as the FPI.
These names could be anything you want.

We placed our FPI in the scriptbank.

We placed our Hud (TGA) in the following path.
gamecoretextmyownhud.tga

Note: that path is really languagebankenglishgamecoretextmyownhud.tga

The languagebankenglish isn't in the script but you need to place it there.
This was & is confusing.
I decided to put the files in the default folders rather than making new ones because of this.

Now just place a Trigger Zone Marker where you want it.
Then right click it and change the aimain to whatever you named your FPI.

Try it out, it should get you started.




by Merranvo

"
BluTank24
17
Years of Service
User Offline
Joined: 29th Jun 2007
Location:
Posted: 1st Jul 2007 21:12
Wow, I've been messing around with this stuff for 2 hours and i still don't get my image to overlay.

I think I will just stick to sound zones

Thanks anyway "mastershake 354"

- BluTank24

BluTank24 - Red Eye Games.

Login to post a reply

Server time is: 2024-11-23 19:17:35
Your offset time is: 2024-11-23 19:17:35