Frictional Games Forum (read-only)

Full Version: Calling a Script when button clicked
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
I try to do this script, but it dont work.

Code:
void function(string &in asParent, string &in asChild, int alState);
{
if(buttonpressed("mouse1", true)){
///stuff here
}
}

Its possible on hpl2 engine?
I don't think so. You can define and make your own functions, but even if you do and it's great, the syntax is still wrong.
I think the best way to call an interaction with an entity is to use the player interaction script.
You won't have direct access to mouse events until HPL3.
Bad news again(
Thanks for answer.