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 / Multiple Keys/Multiple Doors

Author
Message
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 26th Nov 2006 18:32
I am trying to work out a game where you need a particular key for a particular door. I created the individual tga and dds files for each key and door. Then I set each door and key. Then i changed the locked door script todisplay the name for which key youwould need. And when you picked up that key it woudl tell you which one you picked up. However, all my doors are referring to only one key and all my keys are referring to only one key name when picked up. Here is the scripts I am using.

"Baron's Key"


"Baron's Door"


"Gaerzan Key"


"Gaerzan Door"


Now this is only two of the scripts. The other keys/doors are the same script with the different tga files for the different keys/doors. Is the problem because the state variable is similar in all scripts? If so, is there a way to change it so that each one works independently of the other ones? I tried resetting the state to 0 but that didn't work. Please help.

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 27th Nov 2006 00:06
I think you may be missing the point of the entity properties.
you can add the new HUDs you want to the doorkey.fpi script, but you really don't need a particular script to asign a particular key to a particular door.

Just make sure your door knows what key to look for. See image...

Nue B. or not Nue B. That is the question.

Attachments

Login to view attachments
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 27th Nov 2006 00:07
And make sure you name each key to match. See image...

Nue B. or not Nue B. That is the question.

Attachments

Login to view attachments
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 27th Nov 2006 01:39
Thanks for the tip. The scripts I changed were so the player could see which key they picked up and which door each key works with. That was what I was attempting to do. I got it to work with the normal method:
scripts:
pickedupkey.fpi
doorkey.fpi

and labeling each door and key appropriately. But doing it that way doesn't show the player which key goes to which door.

So I load the modified script for each key and door and label them properly, but it just shows one key name and one door name for everything when you approach them. Is it possible to make scripts that will fix this?

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 27th Nov 2006 21:15
Well, are you wanting the key hud to show when the key is collected or when the plr walks near the door?

Nue B. or not Nue B. That is the question.
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 28th Nov 2006 15:40
Both actually. I am trying to have two scripts for the setup. One for the door asnd one for the corresponding key. i.e:
When you walk to the door it says, "Door Locked: Requires Baron's Key"
when you pick up the key it says, "Picked Up Baron's Key"

When I apply just one key and one door it works fine. But when I try to create a second door/key combination, it shows just the first one no matter what TGA file I use in each script. I'm at work now so I will have to describe this rather than just attach an image. (I left out everything I didn't change )

For the door entity I changed:
General
name: Baron's Door
AI
main: Baron's Door.fpi


AI Automated:
Use Key: Baron's Key

For the key I used:

General:
Name: Baron's Key

AI
main: Baron's Key.fpi


AI Automated:
Use Key: Baron's Door

(Tried this both ways, leaving it empty and also with the tag "Baron's Door")

Now, when I use just that one pair it works fine. But when I try to add another door with a different name and another key with a different name, it reverts back to Baron's Door and Baron's key for the display as if all the new scripts were exactly the same as the Baron's scripts. How can I make the doors show their respective names and the keys as well?

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
max ballwinkle
17
Years of Service
User Offline
Joined: 27th Nov 2006
Location: in a pineapple under the sea
Posted: 28th Nov 2006 22:19
you right click the door and give it a name and right click the key and make it only open a certian door!


B-A-L-L-W-I-N-K-L-E
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 29th Nov 2006 00:01
I tried that giving each one their repsective names and linking each one to the appropriate door. For example,
Door 1:
Baron's Door
Key 1:
Baron's Key
Door 2:
Gaerzan Door
Key 2:
Gaerzan Key

(e.t.c)
But for some reason, when I test the game, it all reverts to just one door name and one key name. Even though the scripts are different and the HUD displays are different. It's almost like the HUD never resets to show the new hud image. Basically it's like once it gets a hud image it locks it in and won't display the new ones when prompted.

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 29th Nov 2006 04:44
These next four posts will show the screen shots of each door and key and the scripting changes. When I use one door and one key, it works perfectly fine. When I add a second door and/or a second key, it doesn't work. Is there a setting I am missing that causes the scripts to not load properly?


Screen 1: Baron's Door

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003

Attachments

Login to view attachments
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 29th Nov 2006 04:44
screen 2: Baron's Key

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003

Attachments

Login to view attachments
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 29th Nov 2006 04:45
Screen 3 : Gaerzan Door

LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003

Attachments

Login to view attachments
Cruise McClarren
19
Years of Service
User Offline
Joined: 23rd Aug 2005
Location:
Posted: 29th Nov 2006 04:49
screen 4: Gaerzan Key

scripts for each to make it easier for whomever can help
Baron's Door

Baron's Key

Gaerzan Door

Gaerzan Key


LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 2nd Dec 2006 23:10 Edited at: 2nd Dec 2006 23:22
1) Get rid of the ' in the file path. While you are at it, the spaces shouldn't be there either.
I avoid using spaces and special characters in my folders (directories).
Some people say it doesn't matter but I think it is cleaner.
Anyway, the main problem is described below.


2) Never use the same hudname for more than one hud.
hudname=keydoorprompt and hudname=keyprompt are both used twice
Both of those hudnames are used in stock scripts anyway, so consider them reserved.
Always use unique hud names like baronskeyprompt or baronsdoorprompt

Hope this helps

Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-23 05:25:18
Your offset time is: 2024-11-23 05:25:18