void OnStart() //This could change!
{
AddEntityCollideCallback("Da_box_in_da_rope", "Area", "Interact", true, 1); ///When the rope is down, it will collide with this area, which will activate an area *look down*
}
void Interact (string &in asParent, string &in asChild, int alState)
{
///I don't know how to make an area interactable, so yea... make an area which you can touch. The interaction with it will give you the item (key). Sorry for this little thing. When you interact, it will:
GiveItem("Key", "Item", "Puzzle", "key.tga", 1);
SetEntityActive("Da_key_in_da_box", false);
}
You can make the box smaller than the key so it doesn't collide with the outer of the key.
I just discovered something that might be useful to this thread.
When you make a rope, you can set it's "EndBody" to be a "invisible_body".
This is used if you want the rope to end a specific place, and not just hanging from the ceiling.
I used this to create a bridge, that it held by chains.
In Editor
Spoiler below!
In game
Spoiler below!
Trying is the first step to success.
(This post was last modified: 02-15-2013, 07:19 PM by FlawlessHappiness.)
(04-06-2013, 05:17 AM)JustAnotherPlayer Wrote: There's already a tutorial about this. Nonetheless, it's still useful for someone that didn't understand what this thread below meant. http://www.frictionalgames.com/forum/thread-18804.html
Meh, I didn't know it, but okay, thanks for the heads up.