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
[SOLVED]Script won't work
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#1
[SOLVED]Script won't work

void OnStart()
{

AddEntityCollideCallback("Player", "ScriptArea_1", "OnPlayerCollide_1", true, 1);

}

void OnPlayerCollide_1(string &in asParent, string &in asChild, int alState)
{
StartScreenShake(3, 5, 1, 0.1);
AddTimer("", 2, "Rock_timer");
}

void Rock_timer(string &in asTimer)
{

SetEntityActive("stone_med01_brown_8", true);
StartPlayerLookAt("stone_med01_brown_8", 10, 10, "");
PlaySoundAtEntity("", "break_stairs", "stone_med01_brown_8", 0, false);
PlaySoundAtEntity("", "react_pant", "Player", 0, false);

}

void OnEnter()
{

}

void OnLeave()
{

}

Why doesn't this work?? I don't get it. Most of it is copied, and with changed names. I tried highlighting the different names, and everything seems to be as it should. But nothing happens when i collide with the script area. I've tried copying the name of the area from the editor to the script. Still no luck.

I get no error... just nothing happens.

EDIT: Ok i now tried to set a message, when you start the level. Nothing happens. Apparently the level and the script aren't working together.
But they have identical names (Except for the .map and .hps)

Spoiler below!

[Image: 2dl3edx.png]


EDIT2: Okay i don't know what i did, but i deleted the script, made a new one, exactly the same, restarted amnesia, and now it works...

Trying is the first step to success.
(This post was last modified: 05-28-2012, 08:36 PM by FlawlessHappiness.)
05-28-2012, 08:10 PM
Find
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#2
RE: Script won't work

So no error message pops up now?

05-28-2012, 08:29 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Script won't work

There never was... Just nothing happened. The script and the level didn't connect. But its solved now....

Trying is the first step to success.
05-28-2012, 08:36 PM
Find




Users browsing this thread: 1 Guest(s)