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
Script help with Callbacks
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#5
RE: Script help with Callbacks

(07-18-2011, 06:54 AM)ThePaSch Wrote:
(07-18-2011, 06:44 AM)convolution223 Wrote: Thanks but my problem is more on how do I use the level editor in conjunction with the .hps file to use these. Like, what do I type into those areas on the entity in the level editor? The name of the function, another name for the item, or something else entirely?

You type the callback's name (=function) into the corresponding field; Tanshaydar explained them quite well.
If you hover over the fields, they show you the syntax you're going to have to use for the callback.

For example, you want the "interactedWithDoor"-method to be executed when a player interacts with a door. To do that, you go to the door's entity tab, look for the Interact Callback field and type "interactedWithDoor" (without the quotes) into it.
When you hover over the field, it shows you the syntax to be used. In this case, it's void MyFunc(string in entity).

The code would then be the following:
PHP Code: (Select All)
void interactedWithDoor(string &in entity) {
//do stuff


Thanks again!!! You helped me twice tonight! I am speechlessly grateful Big Grin
07-18-2011, 07:51 AM
Find


Messages In This Thread
Script help with Callbacks - by convolution223 - 07-18-2011, 05:03 AM
RE: Script help with Callbacks - by Tanshaydar - 07-18-2011, 05:45 AM
RE: Script help with Callbacks - by ThePaSch - 07-18-2011, 06:54 AM
RE: Script help with Callbacks - by convolution223 - 07-18-2011, 07:51 AM



Users browsing this thread: 1 Guest(s)