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
Easy to answer question Can I do this?
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#1
Easy to answer question Can I do this?

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?

Special Custom Story for 2 special people!

[Image: LWFcAl]


(This post was last modified: 06-25-2012, 09:55 PM by Jagsrs28.)
06-25-2012, 09:54 PM
Find
bored2tears Offline
Member

Posts: 56
Threads: 6
Joined: Jun 2012
Reputation: 3
#2
RE: Easy to answer question Can I do this?

No. That will not work.

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

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
Find
Jagsrs28 Offline
Member

Posts: 101
Threads: 25
Joined: Jun 2012
Reputation: 0
#3
RE: Easy to answer question Can I do this?

(06-25-2012, 10:10 PM)bored2tears Wrote: No. That will not work.

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

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);
}

Special Custom Story for 2 special people!

[Image: LWFcAl]


06-25-2012, 10:23 PM
Find
bored2tears Offline
Member

Posts: 56
Threads: 6
Joined: Jun 2012
Reputation: 3
#4
RE: Easy to answer question Can I do this?

(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
06-25-2012, 10:36 PM
Find




Users browsing this thread: 1 Guest(s)