Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
It's 2:20 Am, and I am frustrated...
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#2
RE: It's 2:20 Am, and I am frustrated...

(07-03-2013, 01:21 AM)Sanshi Wrote: Hello people of the forums, I've been on the Wiki and tried my best in order to make something that sounds super easy, to turn out to be something to struggle 2 hours for... So what I am trying to do, is make a script that when I collide with a script area, a message appears on my screen.

Most of you will go like "That's easy, just do..." And so on. But please let me bring forth my un-holy script, that refuses to work even when I tried to sacrifice a baby to it.

THE ACTUAL SCRIPT!
_____________________________________________________________

void OnStart()
{
AddEntityCollideCallback("Player", "Awakening_1", "Wokeup", true, 1);
FadeOut(0.0f);
FadeIn(10.0f);
}

void Wokeup(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "WokenUp", 5.0f);
}
_____________________________________________________________

And now my English_Lang file... thingy.
_____________________________________________________________

<LANGUAGE>
<CATEGORY Name="Messages">
<Entry Name="WokenUp">Seems like it's a new day. Wonder what'll happen today.</Entry>
</CATEGORY>
</LANGUAGE>
_____________________________________________________________


Anyone see a problem here?

First of all I see you have FadeIn and FadeOut in same section so.. and you need Addtimer as well.

So try this:


void OnStart()
{
AddEntityCollideCallback("Player", "Awakening_1", "Wokeup", true, 1);
FadeOut(0);
}

void Wokeup(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "WokenUp", 5.0f);
AddTimer ("", 1, "StartIntro");
}

void StartIntro (string &in asTimer)
{
FadeIn (10);
}

Try that. If doesn't work PM me so I can solve this out Smile

“Life is a game, play it”
(This post was last modified: 07-03-2013, 01:34 AM by HumiliatioN.)
07-03-2013, 01:33 AM
Find


Messages In This Thread
It's 2:20 Am, and I am frustrated... - by Sanshi - 07-03-2013, 01:21 AM
RE: It's 2:20 Am, and I am frustrated... - by HumiliatioN - 07-03-2013, 01:33 AM



Users browsing this thread: 1 Guest(s)