Frictional Games Forum (read-only)

Full Version: Call a function when pick up an item
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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)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?
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)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
You're welcome Smile