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 / Doorkey script and hud

Author
Message
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 20th May 2011 01:25 Edited at: 20th May 2011 01:26
I posted this originally in another thread and never got an answer. My fault for throwing a second question in my thread. I was hoping someone could take a look at this and help me out.

My current issue is that I have changed the HUD that appears when you walk up to a door from the original script to a custom one. I changed the doorkey script by by copying the original and creating a new one called MYdoorkey. The new image is in my script as mylockeddoor.tga. When I change the door's main to my script the original doorkey.tga image still appears when you walk up to the door.

I find it odd because the door seems to completely ignore my new script and run as if the the original default door key was still attached to it. I've ran the cleaner several times.

Any idea what I'm overlooking or doing wrong?

Here's the script.
Scientist101
14
Years of Service
User Offline
Joined: 31st Mar 2010
Location: Laboratory
Posted: 20th May 2011 02:32
Just so I understand the steps you did...

You copied the original doorkey.fpi script to a new script called MYdoorkey.fpi. I assume that script resides in the scriptbank folder? Next thing, did you assign your script to the door in the Script AI Main? Check the properties on the door to ensure the script you want is assigned and it did not go back to the default. sometimes people try and type it in, but you only need to click the little three dots in the AI Main Script box to navigate and select the script you want. Next, I assume your TGA file is in fact in the gamecore\text location, and not languagebank\english\gamecore\text folder?

Those would be the only things to not allow your hud to show, and are common little misses that a lot of people miss. Your script is fine otherwise.
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 20th May 2011 16:22
The Mydoorkey.fpi is in the script bank, the script is assigned to the door, and the TGA file is in the correct folder. (Thanks for clearing that part up I wasn't sure which one it pulled the TGA from so I put it in both.)

It still shows the old image. It's very odd. I have ran the cleaner, tried it on new and old levels, etc. It just doesn't apply the change. Before switching the TGA I changed the X,Y location in the original door key script and that took just fine.

Oddly as I think back I've never had any success with replacing existing huds in scripts. I tried to replace a hud made by someone that displayed cheats, controls, etc. on the scene when you press the N key to one that matched my game better. No matter what I change TGA or DDS file as the image it always showed the original image too. The only success I've had with changing huds was the ammo/health/etc. because it can be changed in the settings.

Any other ideas? I was hoping it was my noob scripting changes. lol.
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 20th May 2011 22:21
So, I've made several attempts at cutting and pasting and assembling a script to make a hud appear and had no luck.

When I save using the FPI edit pad the file does not show up when I'm choosing scripts in FPSC. If I open the same folder using windows or fpi edit pad the file is there. Any idea why?

Also, does anyone know a good script I can start with? I'm not even looking for someone to just give me one or do it for me. I really would like to learn basic scripting. At least enough to give my game a more custom appearance. I don't like the text that pops up on the screen rather it be "the door is locked" or "you picked up a weapon" or whatever else. I'd rather use my own images (I'm good at that)as huds for text and displaying things on the screen, etc. However it seems even when I follow a tut or copy a script nothing seems to work.

Any help anyone can give me would be greatly appreciated. Rather it is a sample script or directing me to the tut you learned from.

Thanks in advance.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 21st May 2011 02:42
Quote: "When I save using the FPI edit pad the file does not show up when I'm choosing scripts in FPSC. If I open the same folder using windows or fpi edit pad the file is there. Any idea why? "


Its really quite simple really. You must run FPI Edit Pad as an Administrator or it wont work.

For training well... tell me if you understand this line of code:



Cheers.

God help me, Please.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 21st May 2011 03:10 Edited at: 21st May 2011 03:17
Quote: "Its really quite simple really. You must run FPI Edit Pad as an Administrator or it wont work."


Quote: "For training well... tell me if you understand this line of code:"


LOL.

Quote: "I really would like to learn basic scripting. At least enough to give my game a more custom appearance. I don't like the text that pops up on the screen rather it be "the door is locked" or "you picked up a weapon" or whatever else. I'd rather use my own images (I'm good at that)as huds for text and displaying things on the screen, etc. However it seems even when I follow a tut or copy a script nothing seems to work.

Any help anyone can give me would be greatly appreciated. Rather it is a sample script or directing me to the tut you learned from."


This tutorial will demonstrate how to have an entity display a hud when the player walks towards it. A very simple guide that will help users understand the basics in scripting. The download is here.

If you are new to scripting, FPI EditPad is a good application to use. It was designed to make the scripting a bit more user-friendly and not intimidate people. There are some great features that will help you with the script writing. I've used it, although all my scripting is done solely in TextPad now.

- BlackFox

The function of good software is to make the complex appear to be simple.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 21st May 2011 03:23 Edited at: 21st May 2011 03:24
@BlackFox
Quote: "although all my scripting is done solely in TextPad now."


Why TextPad? I just am wondering, I've never used it so I don't know.

To stay on track... BigJayWH, did you try running in Administrator mode?


Cheers.

God help me, Please.
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 21st May 2011 04:01
I did not run it admin mode. I just clicked on the files and edit pad opened it by default. I should have known since I have to run FPSC, Dark Shader and Brian's programs that way.

@Black Fox, thanks for the link. I have a busy weekend ahead but I'll check that out soon. Thanks.

@Beast, I'll let you know what that means after I check out the community guide.

I appreciate the help. I'll give it a try and let you know how it goes.
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 21st May 2011 04:32
Good luck. Cheers.

God help me, Please.
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 21st May 2011 15:56
@BlackFox: from your tut,

Quote: "Also notice the hudname, hudshow, hudfadeout must have the same name. So in this example, we used terminal_display as the name."


It turns out that's all I had wrong. I thought so but that's one of the changes I made without having edit pad in admin mode. Thanks a lot. That's a nice tut. I wish I would have had it sooner.

@Beast:

To the best of my current level of understanding your code is this:
state=10 is a child script that replaces the parent script with the new command. In this example decreasing the players health by 1000 when the player does something, in this case I believe it's pressing the enter key. (or something like that)
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 21st May 2011 16:23 Edited at: 21st May 2011 16:24
@BigJayWH
Good job. You just explained a script. Guess what... Thats how it is for all scripts.

Script are Just:



To have more than one condition/actions it would be seperated by a , as shown here:



Hope this helps.


If you ever need a script be sure to check my thread here:

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


Cheers.

God help me, Please.
BigJayWH
13
Years of Service
User Offline
Joined: 8th Mar 2011
Location: Indiana
Posted: 21st May 2011 20:00
Thanks again Beast and Black Fox. I was getting quite angry and was about to think I couldn't script at all.

I appreciate the help.

Login to post a reply

Server time is: 2024-11-24 08:25:54
Your offset time is: 2024-11-24 08:25:54