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
Gandalf's scripting questions thread
Samuelblitz Offline
Junior Member

Posts: 16
Threads: 4
Joined: Feb 2011
Reputation: 0
#8
RE: Gandalf's scripting questions thread

(03-05-2011, 03:31 AM)gandalf91 Wrote: Lol, I just might take you up on that. Anyway, just looks like I have one more quick question for tonight. It seems I've learned to use basic "EntityCollide" callbacks pretty well, but I seem to be unable to figure out how to create an interact callback. Tried trial and error a couple times but got error messages about unmatching signatures.

Aside from that, I figured out one my own how to spawn a servant with disabled triggers (so he can't detect you) and then add a 6 second timer upon which the enemy triggers a re-enabled. So I felt accomplished about that. Big Grin

Here is the interact callback script:

SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

under Name put the name of the entity in quotes.
under Callback choose a callback name in quotes.
the last one true or false depending on weather you want the callback to be removed after or not.

and then obviously later in the script you put

void WhatEverYourCallBackNameWas(string &in asParent, string &in asChild, int alState)
{
}

with whatever you want the callback to trigger in the {}'s.

oh and by the way, this: http://wiki.frictionalgames.com/hpl2/amn..._functions
has all the script functions you'll ever need Smile
03-05-2011, 04:05 AM
Find


Messages In This Thread
RE: Gandalf's scripting questions thread - by Samuelblitz - 03-05-2011, 04:05 AM



Users browsing this thread: 1 Guest(s)