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
Code not working correctly!
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#1
Code not working correctly!

void OnStart()
    {
    PlayMusic("01_amb_darkness", true, 0.7f, 1, 0, false);
    AddEntityCollideCallback("player", "ScriptArea_2", "Fade", true, 1);
    }

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

Why is this not working!?! The music plays and I don't get any error messages... I have a script box in the map with the designated name so it should work but it is not...

- Inactive account -
(This post was last modified: 12-30-2013, 10:44 PM by Artyom.)
12-30-2013, 10:37 PM
Find
daortir Offline
Senior Member

Posts: 422
Threads: 9
Joined: Sep 2013
Reputation: 18
#2
RE: Code not working correctly!

Try spelling player "Player". The Engine understands you're talking about the player only if it is spelled Player.
I mean with a capital P.

(This post was last modified: 12-30-2013, 10:50 PM by daortir.)
12-30-2013, 10:50 PM
Find
Artyom Offline
Senior Member

Posts: 370
Threads: 27
Joined: Jul 2012
Reputation: 11
#3
RE: Code not working correctly!

Omg I didn't realize... been to long since I used angelscript >.<

Thanks anyways! Big Grin

- Inactive account -
12-30-2013, 11:23 PM
Find




Users browsing this thread: 1 Guest(s)