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
Script wont work :S
CptLogicDev Offline
Junior Member

Posts: 24
Threads: 10
Joined: Dec 2012
Reputation: 0
#1
Script wont work :S

Hey got some problem with my Script for making a vase move away from a box down to the floor :S

here is the hps

void OnStart()
{
[u][i][b]AddEntityCollideCallback("Player", "ScriptArea_4", "paranormal1", true, 1);[/b][/i][/u]
AddEntityCollideCallback("Player", "scriptarea1", "LookAt", true, 1);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "InsanityArea_1", "Lookatdamage", false, 1);
AddEntityCollideCallback("Player", "Lookat2", "Lookat2Func", true, 1);
AddEntityCollideCallback("Monster", "MonsterDie", "MonsterDie", true, 1);
AddEntityCollideCallback("Player", "Inactivescriptarea", "Scream", true, 1);
PlayMusic("01_amb_darkness", true, 5, 2, 0, true);
SetEntityPlayerInteractCallback("Lab_key", "ActiveArea", true);
SetEnemyDisabled("graveyard_corpse_1", true);
SetEntityPlayerInteractCallback("EXAMPLE_DOOR", "frontdoor", false);
}
[u][b][i]void paranormal1(string &in asParent, string &in asChild, int alState)
{
AddPropForce("vase", 5, 0, 0, "world");
AddBodyForce("vase", 5, 0, 0, "world");
PlaySoundAtEntity("", "react_scare", "Player", 10, true);
}[/i][/b][/u]
void func_slam(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("Doorslam", 1, 1, "");
SetSwingDoorClosed("Doorslam", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);  
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
StopPlayerLookAt();
}


void Lookatdamage(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(30, true);
}
void frontdoor(string &in asEntity)
{
SetMessage("Message", "LockedDoor", 0);
}


void MonsterDie(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", false);
}
void DoorLockedPlayer(string &in entity)

{
    if(GetSwingDoorLocked("EXAMPLE_DOOR") == true)
    {

        SetMessage("Messages", "LockedDoor", 2);

    }
}

void Scream(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 2, "");
AddTimer("", 10, "Timertrigger2");
}
void Timertrigger2(string &in asTimer)
{
SetMessage("Message", "Whatwasthat", 5);
}

void ActiveArea(string &in asEntity)
{
SetEntityActive("Inactivescriptarea", true);
SetEntityActive("script_slam", true);
}
void LookAt(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("LookAt", 1, 2, "");
SetPlayerActive(false);
SetMessage("Message", "whathappend", 5);
AddTimer("", 5, "Timertrigger1");
}

void Timertrigger1(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
}

void Lookat2Func(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("ScriptArea_1", 1, 2, "");
SetPlayerActive(false);
SetMessage("Message", "whatis", 5);
AddTimer("", 5, "Timertrigger3");
}
void Timertrigger3(string &in asTimer)
{
StartPlayerLookAt("ScriptArea_2", 1, 2, "");
AddTimer("", 5, "Timertrigger4");
}

void Timertrigger4(string &in asTimer)
{
StartPlayerLookAt("ScriptArea_3", 1, 2, "");
AddTimer("", 5, "Timertrigger5");
}
void Timertrigger5(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}




void OnLeave()
{

}
12-29-2012, 03:25 AM
Find


Messages In This Thread
Script wont work :S - by CptLogicDev - 12-29-2012, 03:25 AM
RE: Script wont work :S - by TheGreatCthulhu - 12-29-2012, 04:00 AM
RE: Script wont work :S - by Rapture - 12-29-2012, 04:04 AM
RE: Script wont work :S - by CptLogicDev - 12-29-2012, 05:10 AM
RE: Script wont work :S - by NaxEla - 12-29-2012, 05:46 AM
RE: Script wont work :S - by CptLogicDev - 12-29-2012, 09:12 PM
RE: Script wont work :S - by NaxEla - 12-29-2012, 11:25 PM



Users browsing this thread: 1 Guest(s)