Frictional Games Forum (read-only)

Full Version: Easy to answer question Can I do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
void OnStart()

{
AddEntityCollideCallback("Player", "ScriptArea_8", "void FadeOut1(5);", true, 1);
}


Whenever I walk into ScriptArea_8 Will void FadeOut1(5) work?
If not could you tell me how I would set this up?
No. That will not work.

I am not so good at scripting yet, but try this:

Code:
void OnStart()



{

AddEntityCollideCallback("Player", "ScriptArea_8", "Fade", true, 1);

}

void Fade(string &in asParent, string &in asChild, int alState)
{
FadeOut(5)
}

The third thing in quotes is the name of the function that you have to call. This should work.
(06-25-2012, 10:10 PM)bored2tears Wrote: [ -> ]No. That will not work.

I am not so good at scripting yet, but try this:

Code:
void OnStart()



{

AddEntityCollideCallback("Player", "ScriptArea_8", "Fade", true, 1);

}

void Fade(string &in asParent, string &in asChild, int alState)
{
FadeOut(5)
}

The third thing in quotes is the name of the function that you have to call. This should work.
Thanks dude you really helped me out! It crashed at first and said I needed a ; so I added it in:



void Fade(string &in asParent, string &in asChild, int alState)
{
FadeOut(5);
}
(06-25-2012, 10:23 PM)Jagsrs28 Wrote: [ -> ]Thanks dude you really helped me out! It crashed at first and said I needed a ; so I added it in:


void Fade(string &in asParent, string &in asChild, int alState)
{
FadeOut(5);
}
Ah, forgot the damn semicolon. Always remember the semicolon. :3