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 / Half-Life 2 Weapon HUD script

Author
Message
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 02:49 Edited at: 21st Apr 2009 03:41
Hello scripters! I have made this script and I need your sharp eyes to fix it. Here it is:

So there you go. Thanks for your help. P.S. It is suppose to be like the weapon holster system in Half-Life.

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Apr 2009 08:49 Edited at: 21st Apr 2009 09:01
Good start mate

i will email it to you about th errors you
Made, and then i will post it here..

But please download flatlander's fpieditpad because it will make your life easier


Red Eye: Now in the Forums
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Apr 2009 10:16 Edited at: 21st Apr 2009 10:28
Sorry for double post:

Well, the showhud command is not to load a picture , but that show a already loaded picture.
So first we have to load all images that we need.



Dont forget to fill in the x-y coordinates and your path or change the Name

Repeat this a couple of times till you have enough pictures, to use in your script.
Remember if you repeat this you have to change the name ex: weapon1,weapon2
At the end of the last line you repeated you have to call state 1. There we will show all huds. Place this at the end of the repeated lines:

,state=1

And now we want that if you press a key it changes the hud. This could be it:

Scancodekeypressed is a condition not an action.



Why do you have to repeat the hudunshow command?Example: if you press a key to show hud 3 , it only will unshow hud 2, and then if i press a key to show hud 5, it will unshow hud 4 but not hud 3.

Remeber that a fpi script will not work if you have spaces.

Remake your script while keeping this things in mind, if you have any problems just post them.

That is pretty much it...


Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 20:23
I'm not following what you just said real well. Also, is this proper

It is suppose to play a sound when the players health is less than 10.

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Apr 2009 20:27 Edited at: 21st Apr 2009 20:30
lol, i typed that whole thing on my iphone, and you said you dont understand ????? you could try it and see what u come up with. THAT WOULD BE THE LEAST THING YOU COULD DO

Repeat Under 10:


Not repeat:



PLEASE FOLLOW MY ADVICE:

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


Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 20:32 Edited at: 21st Apr 2009 20:35
Thanks. Also, I have editpad but I don't know much about the "state=x" command. I have an iPod touch not an iPhone, sigh.
FPS Creator froze when I tried to place a glass pane. It probably has something to do with I just went to v1.15 beta 3.

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Apr 2009 20:41
Quote: ""state=x""


http://download.fpsfree.com/n79q24t66ks8/scripts/fpi_script.htm

Quote: "I have an iPod touch not an iPhone, sigh."


so? i just wanted to say, that i was typing that whole story on my iphone (hint: very slow) when i had french class.

Quote: "FPS Creator froze when I tried to place a glass pane."


? what ?


Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 20:44
French class... ?what?... Red eye-dropless eyes... IT CAN ONLY MEAN ONE THING!!!! Your Thomas Jefferson!

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 23:36
Hello?

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Apr 2009 23:46
no, i live in the netherlands , i was at school when i was typing that. During french lessons.


Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 21st Apr 2009 23:57 Edited at: 21st Apr 2009 23:58
Quote: "i will email it to you about th errors you
Made, and then i will post it here.."

Your email has not yet arrived. I am still waiting.
Quote: "i live in the Netherlands"

cool

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Apr 2009 00:03
Are you kidding????? I wrote a whole story of your errors... I gave you a whole tutorial.... No i made you a whole tutorial. Read my instructions carefull and you will get there.


Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 22nd Apr 2009 00:19 Edited at: 22nd Apr 2009 00:22
ROFL. But seriously, I don't really understand it. FPI EditPad had a bunch of yellow and red and green lines. I know it is suppose to be all green but it isn't. I can make stuff like "Kill Player" or "Super Jump Height" and stuff like that but I'm really not that good.

fgadzsv bla bla bla
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 22nd Apr 2009 00:23
The 2 scripts you gave him will do the same thing, the state stays the same unless it is changed. Also, if he wants a repeat, then you should not need the state=0 at all.

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Apr 2009 09:46
Quote: "if he wants a repeat, then you should not need the state=0 at all.
"


that is true, but for a beginner that is quite confusing, so i thought maybe just éxplaine him the script with the whole time state=0.

Quote: "The 2 scripts you gave him will do the same thing, the state stays the same unless it is changed."


oeps indeed you are right.

here is the right code.




Red Eye: Now in the Forums
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 23rd Apr 2009 19:57 Edited at: 23rd Apr 2009 20:15
Is this right? I did as best as I could, Red Eye!

I need to know before Monday if this is right. Here is another one that needs revising:

It is important I know before Monday because I won't have internet all day and what I'm making is for someone who is getting back on Monday. Please help, Red Eye!

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 24th Apr 2009 05:52
Some answers would be nice.

fgadzsv bla bla bla
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2009 06:24
Your hud loading lines are almost complete!

Once you've given the HUD "loader" (That's what I call the invisible thing that makes your HUDs) everything it needs to know about the HUD, you need to top it off with the "hudmake" command.

The "hudmake" command comes in many different flavours, but the one flavour you'd be interested in at this point is the "display" flavour.

Once the "hudmake" command is done, your HUD will be ready for use. So, let's start off easy and just add ",hudmake=display" to the end of all your hud loading lines.

The next thing for you to look into is how the "state" command works. The "state" command can be used as an action OR a condition. When used as a condition it will only check to see if the "state" is equal to the number you gave it. "state" is always 0 when the script first starts, and it will NEVER CHANGE unless you tell it to! How do you tell it to? Well, you use "state=" as an action, of course! (This means you put the "state" command after the 2nd colon) When you use it as an action, it will set "state" to that number.

"Why are we using "state" if it doesn't do anything for my game?" you may be asking right now. Well, the answer is simple: Because it lets us easily keep track of what our script should be doing!


I hope that little lesson made some sense to you.

If not, there are much longer and more in-depth tutorials that I've written that you can read. They can be found in the Official FPSC Community Guide. I suggest you read it anyway. It'll help you with all the very basic concepts of scripting and even goes into more advanced concepts when you feel you're ready for those.


The one and only,


freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 24th Apr 2009 20:18
So in summary where do I put "state=0" and ",hudmake=display?"

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 24th Apr 2009 20:26 Edited at: 24th Apr 2009 22:01
Is this right


fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 25th Apr 2009 02:07
Hello? Ply? Red Eye? Help?

fgadzsv bla bla bla
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 25th Apr 2009 15:21 Edited at: 25th Apr 2009 15:24
only thing I can see is that at the end of that last state 0 line, you might want a state=1 action to tell it to start reading state 1

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Apr 2009 02:40
Yes, that's better, and yes, listen to meteorite.

Put a "state=1" action to the end of your last "hud loading line".


The one and only,


freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 26th Apr 2009 22:57 Edited at: 27th Apr 2009 05:45

It won't work! I press any number and the HUD completely disappears! Why is this happening? Are my HUD's in the wrong place?

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 27th Apr 2009 00:22 Edited at: 27th Apr 2009 05:45
Some help would be nice.

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 27th Apr 2009 19:41
Help please!

fgadzsv bla bla bla
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 29th Apr 2009 20:51
Please help me.

fgadzsv bla bla bla
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 29th Apr 2009 21:11
Quote: "Are my HUD's in the wrong place?"


maybe

they are all in the center, give each another place

did you put the files in the good dir

if so

attach this script to a dunamic light with a range of 0


djmaster
User Banned
Posted: 29th Apr 2009 21:32
Check my Serious Game.I made something like this.

A.K.A. chargerbandit
http://chargedstudios.fpschost.com/
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 29th Apr 2009 21:40
I have them in gamecore\huds and languagbank\english\huds.

bla bla bla Mr. Freeman
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 29th Apr 2009 22:24
Quote: "attach this script to a dunamic light with a range of 0"



Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 29th Apr 2009 22:27
I'm not sure if this matters or not, but I never call DDS files in my scripts. I always save my huds as TGA files. Try saving them as TGA files as see if that works.

I also noticed that you don't have a "desc=your description" in the script. Not that it should matter, but sometimes FPSC doesn't like it when you don't have the "desc=your description" in the script.

Priest of the Church of Joe Wood
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 30th Apr 2009 01:44
thanks guys I will try those when I get home. I had the script attatched to an always active entity with spawn at start to no and spawn after delay to yes and triggger zone to spawn it. It spawned but didn't work. I did it with the flashlight and it worked but this was weird. Like I said I'll do this when I get home and maybe make a vid to show you everything I've done so far.

bla bla bla Mr. Freeman
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 30th Apr 2009 01:49 Edited at: 30th Apr 2009 01:51


Look at your hudimagefine path it certainly does not look like the right path

Try this all huds need to be unshown be for 1 is shown because they are randomly called.

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 30th Apr 2009 02:46
@hockeykid: apollo forums dont support slashes in code snipets


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 30th Apr 2009 04:01
I know but his path says

Quote: "gamecore\huds\1.dds"


and his hudnames have .dds at the end

Quote: "hudname=weapon1.dds"


freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 30th Apr 2009 05:06
More posts! I want this to be my first multipage thread!

bla bla bla Mr. Freeman
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 30th Apr 2009 07:20
Remove the ".dds" from the end of your HUD names. You're not using the .dds when you're calling your HUDs. This is a problem.


The one and only,


Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 30th Apr 2009 13:15
Quote: "More posts! I want this to be my first multipage thread!"


WOW




Call it .png and not dds. That works for me.... As i use a similar script.


freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 30th Apr 2009 21:34
Thanks guys! this is how it looks:


bla bla bla Mr. Freeman
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 30th Apr 2009 21:35
To me the slashes appear in the post above but they may not to you.

bla bla bla Mr. Freeman
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 30th Apr 2009 22:12
Here are my HUDs. Is there something wrong with them? To big or small? Wrong color? It still makes my HUD disappear. The script is above.

bla bla bla Mr. Freeman

Attachments

Login to view attachments
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st May 2009 01:30
Describe, in detail, what it looks like when the script starts, what you do, and what happens when you do that. I'm having a hard time understanding what you're seeing.


The one and only,


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 1st May 2009 03:55 Edited at: 1st May 2009 03:55
Edit: never mind

freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 5th May 2009 04:03
@Ply
I press any number and my ENTIRE hud disappears. It doesn't go away! Also, is there a scancodekey for the left and right mouse buttons? I'll post a pic in a minute.

bla bla bla Mr. Freeman
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 10th May 2009 17:15
Hello people!?

bla bla bla Mr. Freeman
djmaster
User Banned
Posted: 10th May 2009 18:27
Post the script so we can advise.

A.K.A. chargerbandit
http://chargedstudios.fpschost.com/
freak of nature 64
15
Years of Service
User Offline
Joined: 19th Jan 2009
Location: Look in your car...
Posted: 10th May 2009 20:40
Are you kidding me!? I've been asking what's wrong with it for like 10 posts! It's on the first page! Have you actually read this or just looked for what you want for yourself? If you have read this you'd know that I need to know if it's my HUD size.

bla bla bla Mr. Freeman
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th May 2009 08:39
Quote: "my ENTIRE hud disappears. It doesn't go away!"


I'm confused here. It disappears but doesn't go away?? That doesn't make sense.


The one and only,


Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 11th May 2009 20:39 Edited at: 11th May 2009 20:40
Quote: "Describe, in detail, what it looks like when the script starts, what you do, and what happens when you do that. I'm having a hard time understanding what you're seeing."
'

...I second that...

...and...

Quote: "
[quote]Quote: "my ENTIRE hud disappears. It doesn't go away!""


I'm confused here. It disappears but doesn't go away?? That doesn't make sense. [/quote]

...that.

Login to post a reply

Server time is: 2024-11-25 01:58:09
Your offset time is: 2024-11-25 01:58:09