Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How to make a Crowbar work?
Author Message
laser50 Offline
Member

Posts: 243
Joined: Apr 2011
Reputation: 0
Post: #1
[SOLVED] How to make a Crowbar work?
Just as the title Said, How to make a Crowbar work on a door??

(Code And Explaination please, if possible.)
(This post was last modified: 04-24-2011 04:27 PM by laser50.)
04-24-2011 02:51 PM
Find all posts by this user Quote this message in a reply
Simpanra Offline
Senior Member

Posts: 314
Joined: Mar 2011
Reputation: 0
Post: #2
RE: Event When Something has been picked up
I think it would be an; AddEntityCollideCallback(

Although thats only with areas.....erm....to be honest, i got no idea i just thought i would try x3
04-24-2011 02:57 PM
Find all posts by this user Quote this message in a reply
stonecutter Offline
Member

Posts: 130
Joined: Feb 2011
Reputation: 4
Post: #3
RE: Event When Something has been picked up
Take a look at your item you want to pick up in the level editor and search for " interactcallback" or something similar ... then write something in the empty box like " PickedupItemOne "

Then you write

void PickedupItemOne ( ..... )
{
simpleFunction ....
}

hope it helps cause i am not at home and have no code as an example !
(This post was last modified: 04-24-2011 03:01 PM by stonecutter.)
04-24-2011 03:00 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #4
RE: Event When Something has been picked up
(04-24-2011 02:51 PM)laser50 Wrote:  Just as the title Said, How do i make an event happen once a player picked an item up?

(Code And Explaination please, if possible.)
void OnStart()
{
SetEntityPlayerInteractCallback("Item", "Function", true);
}
void Function(string &in asEntity)
{
[EVENT]
}

Item = The item that is interacted with
Function = The function that is called
EVENT = What happens after the player picks the item up
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction); = Line of code

(This post was last modified: 04-24-2011 03:02 PM by Kyle.)
04-24-2011 03:00 PM
Find all posts by this user Quote this message in a reply
laser50 Offline
Member

Posts: 243
Joined: Apr 2011
Reputation: 0
Post: #5
RE: How to make a Crowbar work?
Thanks for the help, I've edited my first post and title. I hope someone could aswell explain me how to do that.
04-24-2011 03:43 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)