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
Call a function when pick up an item
RenanFOX2 Offline
Junior Member

Posts: 5
Threads: 2
Joined: Apr 2012
Reputation: 0
#1
Call a function when pick up an item

Hey guys, I'm having a big trouble to call a function when the player pick up an item. I tried to use SetEntityPlayerInteractCallback but it didn't worked.
(This post was last modified: 04-20-2012, 03:36 PM by RenanFOX2.)
04-20-2012, 03:01 PM
Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Call a function when pick up an item

Wrong thread for help, it's supposed to be in Development support Smile

You can call the function with the item in the level editor

04-20-2012, 03:05 PM
Find Reply
RenanFOX2 Offline
Junior Member

Posts: 5
Threads: 2
Joined: Apr 2012
Reputation: 0
#3
RE: Call a function when pick up an item

(04-20-2012, 03:05 PM)SilentStriker Wrote: Wrong thread for help, it's supposed to be in Development support Smile

You can call the function with the item in the level editor
Please come one. Sorry for postin in the wrong thread for help, but I'm stunk here for two days.

How to call a function using this way?
04-20-2012, 03:12 PM
Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Call a function when pick up an item

When creating an item in the level editor, select it and press the entity tab on the right, then in Callback func write the name of your function then in the .hps you write like this

void OnStart()
{

}

void NAMEOFFUNCTION(string &in asEntity, string &in asType)
{
//Stuff you want to happen
}

04-20-2012, 03:20 PM
Find Reply
RenanFOX2 Offline
Junior Member

Posts: 5
Threads: 2
Joined: Apr 2012
Reputation: 0
#5
RE: Call a function when pick up an item

(04-20-2012, 03:20 PM)SilentStriker Wrote: When creating an item in the level editor, select it and press the entity tab on the right, then in Callback func write the name of your function then in the .hps you write like this

void OnStart()
{

}

void NAMEOFFUNCTION(string &in asEntity, string &in asType)
{
//Stuff you want to happen
}
Thanks a lot!!!
It's working now XD
04-20-2012, 03:37 PM
Find Reply
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: Call a function when pick up an item

You're welcome Smile

04-20-2012, 03:37 PM
Find Reply




Users browsing this thread: 1 Guest(s)