Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How to make a Crowbar work?
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#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
Simpanra Offline
Senior Member

Posts: 314
Threads: 28
Joined: Mar 2011
Reputation: 0
#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
stonecutter Offline
Member

Posts: 140
Threads: 17
Joined: Feb 2011
Reputation: 4
#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 !

We Shall Arise - Death / Grind from Bavaria
Musicvideo : http://goo.gl/HzxvLK
Facebook : http://goo.gl/9YfYCV
Free Album : http://goo.gl/sEBW2X
(This post was last modified: 04-24-2011, 03:01 PM by stonecutter.)
04-24-2011, 03:00 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#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
laser50 Offline
Member

Posts: 242
Threads: 22
Joined: Apr 2011
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)