Frictional Games Forum (read-only)

Full Version: Script problem with Interact.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Someone can tell me what is wrong please?

Code:
void OnStart()
{
SetEntityPlayerInteractCallback("key_2", "room", false);
}

void room(string &in asParent, string &in asChild, int alstate)
{
GiveSanityDamage(20, true);
SetEntityActive("insanity1" , true);
SetEntityActive("insanity2" , true);
SetEntityActive("insanity3" , true);
SetEntityActive("insanity4" , true);
SetEntityActive("insanity5" , true);
}

The game Starts but when i catch the key nothing happens.
Use (string &in entity) instead of (string &in asParent, string &in asChild, int alstate)
(07-04-2011, 08:15 PM)rojkish Wrote: [ -> ]Use (string &in entity) instead of (string &in asParent, string &in asChild, int alstate)

I'm not sure if that would work because it should be (string &in asEntity). Just to let you know, you could be right. Smile
(07-04-2011, 09:24 PM)Kyle Wrote: [ -> ]
(07-04-2011, 08:15 PM)rojkish Wrote: [ -> ]Use (string &in entity) instead of (string &in asParent, string &in asChild, int alstate)

I'm not sure if that would work because it should be (string &in asEntity). Just to let you know, you could be right. Smile

It's as I wrote actually, check the script functions page.
is

(string &in asEntity)

Thanks Wink
(07-05-2011, 12:20 AM)rojkish Wrote: [ -> ]
(07-04-2011, 09:24 PM)Kyle Wrote: [ -> ]
(07-04-2011, 08:15 PM)rojkish Wrote: [ -> ]Use (string &in entity) instead of (string &in asParent, string &in asChild, int alstate)

I'm not sure if that would work because it should be (string &in asEntity). Just to let you know, you could be right. Smile

It's as I wrote actually, check the script functions page.

It looks like you were wrong, and also the script functions page. Smile
Really? oh wow that's weird