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 Product Chat / Displaying different huds for items in the game ?????????

Author
Message
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 23rd Jul 2011 23:37
I am kind of stuck. In my game the player has to pick up various items to complete his mission. what I would like to do is have the hud for "picked up item" read what he's picked up and objective 1 complete. example ".......Good Work You've Found The Files." objective 1 complete. Thing is I have made huds for these items and saved them as their item is named. Example "pickupitemfiles.tga" but when i apply it and say pickupitemantidote.tga every item will I change reads the same thing like i can pick up the antidote and the hud will read you picked up the files. How do I fix this? I have tried creating a folder and naming it huds2 and changing that in the gamecore/text/Pickupitem to read gamecore/huds2/pickupfiles. Can you help I used gimp

Thanks
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2011 00:00
In your script, make sure you gave "hudname" something different for each unique HUD that will be displayed. It sounds like you gave the antidote HUD the same name as the files HUD.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 24th Jul 2011 01:06
Ahh That makes sense probably the only thing I didn't try. Thanks Ill try it out.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 24th Jul 2011 01:43
Ok obviously I am missing something here I still can't get it to work right.

here the name I gave one of the huds I made in gimp

pickedupanitemfiles.tga

here is how I edited the items main fpi.
;Artificial Intelligence Script

;Header

desc = Pickup Item and mark as collected by player

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds2\pickedupanitemfiles.tga,hudname=itemprompt,hudhide=1,hudmake=display,dimvar=collecteditemA,setvar=collecteditemA 0,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=itemprompt,hudfadeout=itemprompt,setvar=collecteditemA 1
:state=1:rundecal=5

;End of Script

I tired changing the hud name to the following:
hudname=pickedupanitemfiles
hudname=itemfilespromt

what am I missing? or doing wrong
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2011 02:01
Things to check:

1) The file is found by FPSC and loaded properly. If the file was not found, this can cause a few different problems.
2) The name given to the hud is not used by another hud (esp. a hud that uses a differentimage file)
3) The proper script has been attached to your entity.

To check #1, place the item into a level by itself, with no other entities at all. This will prevent other scripts from interfering with your entity's script.
To check #2, Ensure #3 checks out for ALL other scripts in your level.

I suggest placing your entities one by one into a small, empty level, checking each one as you go, and checking every entity, every time, to make sure they all work well with each other.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
maho76
15
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 24th Jul 2011 02:26 Edited at: 24th Jul 2011 02:31
i dont get it. for what item the upper snippet is main? files-item? yes, declared with the name of the tga. if for the antidote, , no. exchange the used tga (and the varname). too stupid so couldnt be? ok.

checked your writing? hapened often to me and caused many facepalms since i copy&paste names directly from editor into the script. needs more time but avoids failures.

Quote: "hudname=itemfilespromt"
out of your post >
Quote: "hudname=itemprompt"
out of your snippet. other name and P missing.

try posting both codes, the one for the files-item and the one for the antidote so we can search.

EDIT:

oh, another stupidity sometimes happens to me :

checked the tga in gimp if saved the right pic? i worked on a copy of a former pic and doing so much work on it and had opened so many files that i pressed the save "NO" button on the wrong one because i was tired. was a beautifull moment when i presented it to our customers the next day ... without checking^^
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 24th Jul 2011 03:53
here is the original pick up hud

;Artificial Intelligence Script

;Header

desc = Pickup Item and mark as collected by player

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupitem.tga,hudname=itemprompt,hudhide=1,hudmake=display,dimvar=collecteditemA,setvar=collecteditemA 0,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=files,hudfadeout=itemprompt,setvar=collecteditemA 1
:state=1:rundecal=5

;End of Script


Here is how I edited it

;Artificial Intelligence Script

;Header

desc = Pickup Item and mark as collected by player

;Triggers

:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds2\files.tga,hudname=files,hudhide=1,hudmake=display,dimvar=collecteditemA,setvar=collecteditemA 0,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=files,hudfadeout=files,setvar=collecteditemA 1
:state=1:rundecal=5

;End of Script


The fpi script was saved as "files" and put in my custom folder called "huds2"

The original I edited in Gimp is titled pickedupitem and it was the script that came with the game I kept the original and just renamed the one I customized. When I open FPS and go Files-languagebank-english-gamecore-huds2 the custom hud I created is there I just can't get it to appear when I want it to.

I am using just a small test level with an item and a door to check if the scripts are working. I am also trying to get a custom door hud to appear.

Now in my ignorance I am thinking I can change where the engine looks for the hud. So it looks in my custom or "huds2" folder and if I change this line in the script hudimagefine=gamecore\text\pickedupitem.tga

to hudimagefine=gamecore\huds2\files.tga

It should pull up my custom "You picked up the files" hud.


What am I doing wrong?
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Jul 2011 09:20 Edited at: 24th Jul 2011 09:22
Quote: "hudshow=files,hudfadeout=itemprompt"


Are you sure that's the original script? Both names right there should be identical.

Also, be aware that there are two "gamecore" folders that FPSC looks in. Maybe you're putting it in the wrong one?


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Troutflies
15
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 25th Jul 2011 18:29
I figured it out, thanks for the help.

Login to post a reply

Server time is: 2026-07-01 08:17:07
Your offset time is: 2026-07-01 08:17:07