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 / hud display script

Author
Message
tripper
17
Years of Service
User Offline
Joined: 12th Oct 2007
Location:
Posted: 4th Nov 2007 20:53
hi i am trying to display a message when you go in to a triger zone

and every thing i try dosnot work here is the script i am using

;Artificial Intelligence Script

;Header

desc = markhud HUD

;Triggers

:state=0:hudreset,hudx=50,hudx=90,hudimagefine=languagebank\english\g
amecore\text\markhud.tga,hudname=markhud,hudhide=1,hudmake=display,
state=1

:state=1,plrwithinzone=1:hudshow=markhud,state=2

:state=2,plrwithinzone=0:hudshow=markhud,state=1

:End of Script


can some won please help me

tripper1977
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Nov 2007 22:31 Edited at: 4th Nov 2007 22:38
languagebank\english\gamecore\text\markhud.tga

...is a good path to put your image in.

However, in the FPI script you omit the "languagebank\english" part.

I know this may seem strange but it defaults to the languagebank\english as a root, so you do not need to tell it that part.

So, leave your image there but only use "gamecore\text\markhud.tga" as the path in your script and it should work.

Be careful though with the placement of HUDs, so that they do not get displayed offscreen, because it can cause problems.

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Nov 2007 07:36 Edited at: 6th Nov 2007 07:36
@Conjured Entertainment:

I normally agree with you, but I must contradict here.

The scripts in FPSC default to the folder that he initially thought it did. The "Files" folder...

Hence, why the action:



will work.

I can tell just from readin the script what is going to happen.

When the player enters the zone, it will show the hud just fine, but when the player leaves the zone, it will continue to show it.


@tripper:

You need to change this line:



To this:



That will make the hud fade away when the player leaves the zone... if you don't like it fading away and just want it to disappear right away, then change "hudfadeout" to "hudhide".

Now, you can optimize this code a little bit by replacing BOTH the "state=1" and "state=2" lines with this:



That will do exactly what you're looking for, but in a single line of code.

Hope that cleared some things up for you.


The one and only,
~PlystirE~

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 16:05 Edited at: 6th Nov 2007 16:36
I didn't notice that typo

It should have read ...

:state=2,plrwithinzone=0:hudunshow=markhud,state=1


Quote: "The scripts in FPSC default to the folder that he initially thought it did. The "Files" folder..."

Yeah and the drive letter and so on, but I didn't think we need to go into the full path explination.

My way does work but you were right about the typo.
hudunshow works like the hudfadeout only it does it instantly instead of fading.
the problem was that he omitted the UN part, and the path.
I was right about the languagebank\english part, just try it.

We all already know it goes to the C:\Program Files\The Game Creators\FPS Creator\Files and then whatever else.
I was just saying that you don't need to specify the languagebank\english part of the path, which is true.


Now, that I examine the script closer there is another error all missed...
:End of Script

That should be a semi colon not a colon, like so...
;End of Script


Here is the modified code that will work if you have you image in the folder that you specified in your path above.
( C:\Program Files\The Game Creators\FPS Creator\Files\languagebank\english\gamecore\text\markhud.tga )



Don't forget to visit Conjured Entertainment

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 16:57 Edited at: 6th Nov 2007 17:01
Quote: "I normally agree with you, but I must contradict here.

The scripts in FPSC default to the folder that he initially thought it did. The "Files" folder...

Hence, why the action:

+ Code Snippet
sound=audiobank\atmos\powerhum.wav

will work.

I can tell just from readin the script what is going to happen.

When the player enters the zone, it will show the hud just fine, but when the player leaves the zone, it will continue to show it."

Wrong, his image would not display at all.
HUDs are different that sound files.
You are right that the sounds work directly from the files\audio path, since it does default to the files folder as a root.
However, when specifying the path for a HUD, it does default to the ...files\languagebank\english folder for a root.
If you try it out, then you will see what I mean.


NOTE:
I double posted instead of editing my other post because I did not feel like typing in all of the forward slashes ( \ )again.
(The forum deletes them on an edit, and I got tired of retyping them over and over because there were so many.)

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 01:08
I forgive double posts when someone is actually attempting to help someone else, so to me it's fine.


About the HUD path... I haven't put a single custom HUD in the english folder... All my custom HUDs are located in the path "Files\gamecore\huds"

And it works when I load the HUDs like so:

hudimage=gamecore\huds\nameofhud.png


It works perfectly fine! However, if he did put them into the "english" directory, then you may be right about needing to delete the "languagebank\english" from it. I haven't tried that before, so I can't say for sure. You say that you have all YOUR HUDs in there so you probably know that it needs to be deleted.


I'm feeling lazy today and don't want to go out and try it, just wanted to say that my HUDs don't default to that folder.


The one and only,
~PlystirE~

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 7th Nov 2007 03:32 Edited at: 7th Nov 2007 03:33
Ok i believ you because I never have tried it your way. (i'll take your word for it)

So, maybe it will look in both gamecores, but all I do know is that if you put the languagebankenglish in the path it won't find it.

I wasn't trying to argue I was just backing my point.

I guess both our ways will work, then.

I assumed it was defaulting there since you have to omit that in the path.

Anyway did you get it to work Tripper???

Don't forget to visit Conjured Entertainment

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Nov 2007 07:22
I'm going to go out on a limb here and say that somewhere in our mess of point making, he figured it out and left us to continue making points.


The one and only,
~PlystirE~

Login to post a reply

Server time is: 2024-11-27 19:17:29
Your offset time is: 2024-11-27 19:17:29