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 an image in game?

Author
Message
Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 07:54
Hey i was wondering if there was a way that you could walk up to an entity and when you press a button it will display an image on the screen?

Does anyone know how i might do this? Or is there already a script that can do that?

Thanks!

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 7th Aug 2011 17:28
Yes, just have a hud load up when the player presses the desired button.


Cheers.

God help me, Please.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 7th Aug 2011 18:16
show hud with trigger-button or show the picture directly on the entity?

for triggerbutton:
search for "crthud" around here anywhere. nice prog to build huds, triggered, standard, triggerzoned etc. does everything for you automatically, even build the right fpi and dds in the right folders, you have only to draw the picture to insert. i think its made by doomster.

for appearing pics directly on entity (augmented reality o.s.e):
build a flat entity with the pic as a texture right in front of your entity that appears with a trigger.
i think you can also use alternative texture, but dont know how to do this.
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 7th Aug 2011 19:04 Edited at: 7th Aug 2011 19:07
I needed this exact same thing for my game. I needed to walk up to an entity, press the use button, and an image of that entity appears in the hud.

Assign this script to the entity's ai main field;



For "userimage" put the image you want to appear in the hud, in the gamecore\huds folder.

Obviously you need to create the image you're going to use, in something like Paint.net or Gimp.

You can apply this script to any entity you want, the only thing that matters is placing the corresponding "userimage" in the huds folder.

Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 21:53
Wow thank you guys for all of the comments! I will try all of the methods as soon as i can!

Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 7th Aug 2011 23:54
@Bruce3371 - Your method did not work? I placed the image i wanted to use in the gamecore\huds folder, and then changed the script and assigned it to the entity but it didn't do anything? Is it supposed to just appear? Or do i have to click a button?

@Maho76 - I will check out that hud program, it sounds interesting! And i don't really know how to create entities? :/ But it made me come up with a great idea for my game!

@2Beastmode4u - Thanks for the info, but i need a little more.. You know? Detail?

Alright question time!

QUESTION/IDEA
Would it be possible to have 2 entities, one being on a table, and the other straight up and down in the air above that other entity. And have it so when you walk up to the entity, you press the F key to make the other entity appear? And then when you walk away it disappears? It would be great if someone could help me in making this! Thanks a lot!

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 8th Aug 2011 00:18 Edited at: 8th Aug 2011 00:23
When you approach the entity you've assigned the script to, it should display the message; "Press Enter to use". So you need to press the enter key for the image to display.

You might also need to increase the 'plrdistwithin' distance in the script (I used 50 in mine), if you can't get right up close to the entity. Use a number between 45 and 100 for the distance, 100 being the full width/length of a segment.

2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 8th Aug 2011 00:25
@Exu Corporations
I would make the script for you but you know, the business and all. I will give you as many hints as I can though.

Have a script set up that when the player is near and pressing a button, show the desired hud.


Cheers.

God help me, Please.
Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 00:50
Alright im not going to have any more request as i find it is necessary and im wasting your guy's time. So with that being said, can someone point me in the right direction for a tutorial on how to script?

Quote: "Have a script set up that when the player is near and pressing a button, show the desired hud."


It seems so easy when you say it like that Can i just steal from different scripts and put them into one and change them up a bit? Like taking a script that displays and image, and another script that makes you press a button, and then put it into one script? Or will that not work?

Thanks for commenting though 2Beastmode4u!

@bruce3371 - It did not display anything.. I will try it on another entity because i think the one im using is messed up.. But thanks for the info!

bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 8th Aug 2011 01:15 Edited at: 8th Aug 2011 01:16
The entity has to be dynamic for it to work. (Assuming you're not trying to do this in your Unreal re-make multiplayer map?).

I used it on the stock scifi pc monitor entity (the one named 'item1'). If you're still haveing problems with it, I'll put together a small map for you to see how it works.

As for learning scripting, I'm still learning myself! Mixing and matching portions from different scripts as you mentioned, is a good way to learn, but you have to be carefull about the states (ie 'state=1' etc) in the scripts; that's the thing that catches me out most often when I make scripts this way!

I would also recommend using Flatlander's usefull FPI EditPad, when writing scripts, which can be found here;

http://forum.thegamecreators.com/?m=forum_view&t=129738&b=23&msg=1499215#m1499215

Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 02:19 Edited at: 8th Aug 2011 02:28
Quote: "The entity has to be dynamic for it to work."


That may have been my problem, im dumb at times

Quote: "Assuming you're not trying to do this in your Unreal re-make multiplayer map?"


Nope, im working on an Amnesia type game. It looks really good right now. I will be uploading it to the WIP section soon once i get further into it!

Quote: "I would also recommend using Flatlander's usefull FPI EditPad, when writing scripts, which can be found here;"


I will give the link a look, thanks!

EDIT - So i just tried to download the FPI edit pad thing, and this is what i got: See attached. What should i do? :/

Attachments

Login to view attachments
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 8th Aug 2011 17:24
Which version did you download?

Did you click on the link that said 'here' and took you to a download page on the forums?

Or did you click on the link that said 'FPSC Stock Version'?

The first link is for the full version, whilst the 2nd link is just to update older versions.

It's the first link that you need.

Desecrated Studios
13
Years of Service
User Offline
Joined: 16th Jan 2011
Location: Kirtona
Posted: 8th Aug 2011 19:14
Oh alright, thanks for the info! I got it working!

Login to post a reply

Server time is: 2024-11-24 06:58:25
Your offset time is: 2024-11-24 06:58:25