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 / Display image?

Author
Message
Stick Masta
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location:
Posted: 1st Jul 2010 02:58 Edited at: 1st Jul 2010 03:02
I want to make it so when you walk near this machine it shown an image, this video = http://www.youtube.com/watch?v=JKQ2wyB9eAM&feature=player_embedded

Is there any way to make it do that?

EDIT: Video seems to be dead on my end, I made a mirror,
http://ohnoitsdead.webs.com/

Lag? No Thanks, Fenix Mod has me covered.
Stick Masta
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location:
Posted: 1st Jul 2010 08:44
15 views, no replies?

Sorry for double post.

Lag? No Thanks, Fenix Mod has me covered.
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 1st Jul 2010 16:06 Edited at: 2nd Jul 2010 10:13
This script shows a image when you come close to the entity and removes the image when you go away:



You'll have to replace YOURHUD.tga with the name of your imagefile and place that file in the gamecore/text folder.
And you should give it a name (hudname). I named it here YOURHUDNAME.

Here is a other version:
In this one the player can additionally unshow the image by pressing the "F" key.



And one more version

In this one the image doesnt show up automatically.
The player has to press the "F" key when he is close.
To unshow the image he can press "F" again or go away.



Edit: comments removed from scripts...they made them more hard to read than without comments + one useless condition removed in script #3
Stick Masta
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location:
Posted: 1st Jul 2010 21:00
So I make a .fpi file with that in it?

Lag? No Thanks, Fenix Mod has me covered.
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 1st Jul 2010 21:20
Yes and save it in the scriptbank folder.

Make a right mouseclick on the entity in the editor and attach the script as Main script.

The entity must also be set to dynamic. Else the script will not run.
Stick Masta
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location:
Posted: 2nd Jul 2010 04:27
Thanks broham, except for 1 thing, it only shows half of it.

Lag? No Thanks, Fenix Mod has me covered.
ctm
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location:
Posted: 2nd Jul 2010 16:22
You mean the bottom of the pic is cut because the image is displayed at the bottom of the screen?

If yes it is because these scripts were originally the dooruse script. The dooruse script displays the "Press enter to use" image near the bottom of the screen.

Take a look at the first line of the script.
There you'll find the hudx=X and hudy=X actions. These are for the x and y position of the image.

The y position was set to 90 (near the bottom of the screen).

hudx=0 is the left side of the screen
hudx=50 is the middle of the screen (horizontal)
hudx=100 is the right side of the screen

hudy=0 is the top of the screen
hudy=50 is the middle of the screen (vertical)
hudy=100 is the bottom of the screen

I have edited the scripts and set the vertical y position to 50 now.

Hope that helps.
Stick Masta
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location:
Posted: 2nd Jul 2010 20:31
Oh that helps a ton, thanks!

Lag? No Thanks, Fenix Mod has me covered.

Login to post a reply

Server time is: 2024-11-24 21:48:35
Your offset time is: 2024-11-24 21:48:35