The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Messages In This Thread
[SOLVED]Script won't work - by FlawlessHappiness - 05-28-2012, 08:10 PM
RE: Script won't work - by Xanthos - 05-28-2012, 08:29 PM
RE: Script won't work - by FlawlessHappiness - 05-28-2012, 08:36 PM



Users browsing this thread: 2 Guest(s)