ethics
Member
Posts: 51
Threads: 18
Joined: Jan 2014
Reputation:
0
|
Where is a key usually hidden? [Solved]
So I had the idea to create a puzzle, where you encounter a locked door, then you have to backtrack to search for the key. It should be hidden in a closet, inside a white shirt.
Now I wanted the shirt to be interactable, so if you click on it, you get the key.
How do I do that?
I know the crator of "Deterioration" did it, I looked through the script, but it confused me.
Can you kind people out there help me?
(This post was last modified: 05-10-2014, 10:28 AM by ethics.)
|
|
04-17-2014, 01:30 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Where is a key usually hidden?
I can help :3
The way I see it, you can do this one of two ways You can give the item directly from the code, or you can make it drop from the shirt, preferably underneath it.
The first one, which you get directly from the shirt:
That, I BELIEVE would work, but you would have to just test it to make sure you receive a key at all. Change the appropriate stuff that you need to (anything enclosed in a <> but don't delete the "" marks). The thing in the lang file is ItemName_<itemname> and ItemDesc_<itemname>. You can change the graphical image to whatever is in the redist/graphics/item/ folder.
The other method, which is make a key appear from underneath and fall to the ground is this:
This one, you have to place the appropriate key underneath the shirt, name it whatever the name of the key is in the Level Editor, and untick "Active" from the Level Editor.
Discord: Romulator#0001
|
|
04-17-2014, 02:03 PM |
|
ethics
Member
Posts: 51
Threads: 18
Joined: Jan 2014
Reputation:
0
|
RE: Where is a key usually hidden?
(04-17-2014, 02:03 PM)Romulator Wrote: I can help :3
The way I see it, you can do this one of two ways You can give the item directly from the code, or you can make it drop from the shirt, preferably underneath it.
The first one, which you get directly from the shirt:
That, I BELIEVE would work, but you would have to just test it to make sure you receive a key at all. Change the appropriate stuff that you need to (anything enclosed in a <> but don't delete the "" marks). The thing in the lang file is ItemName_<itemname> and ItemDesc_<itemname>. You can change the graphical image to whatever is in the redist/graphics/item/ folder.
The other method, which is make a key appear from underneath and fall to the ground is this:
This one, you have to place the appropriate key underneath the shirt, name it whatever the name of the key is in the Level Editor, and untick "Active" from the Level Editor.
Didn't knew it was that easy!
But I tried this script once for a locked door, I should interact with it and a message should be displayed. Didn't work.
I think ''SetEntityPlayerInteractionCallback'' works only for pickable items, like notes or oil.
But i'm gonna try it anyway.
Thanks!
EDIT: As I said, didn't work. I think you ave to place a script area in front of the shirt to be able to interact with it.
ANOTHER EDIT: This time, I looked through the map of "Deterioration", and skimmed to the place, where I found the key in the shirt and indeed, you have to place a script area.
Thanks for your help, but now, I know the FULL TRUTH!
(This post was last modified: 04-17-2014, 04:30 PM by ethics.)
|
|
04-17-2014, 04:19 PM |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: Where is a key usually hidden?
Yeah, some entities don't work because they are static. If they can't be disabled in the level editor, I don't think you can interact with them either. Use script areas with ItemInteraction box checked instead.
|
|
04-17-2014, 05:17 PM |
|
SSEAlexander
Senior Member
Posts: 422
Threads: 26
Joined: Feb 2014
Reputation:
1
|
RE: Where is a key usually hidden?
(04-17-2014, 05:17 PM)Mudbill Wrote: Yeah, some entities don't work because they are static. If they can't be disabled in the level editor, I don't think you can interact with them either. Use script areas with ItemInteraction box checked instead.
Ya,thats right.Object CANNOT be as "StaticProp" or else it will be static.It can be : "Object : Static". (Change in user defined variabled)
|
|
04-19-2014, 02:00 PM |
|
|