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
Entity is NOT supposed to be active
HeadyBoy Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jul 2012
Reputation: 0
#1
Entity is NOT supposed to be active

I've been trying to do something with statues.


You start in one area with a statue and as you move to the next room, the statue is supposed to disappear and look like it's reappearing in the next room.


This isn't happening. It looks as if all of my entities are active at the same time and my triggers aren't working.. anybody know what's up with this? I will post part of my script below. This is really irritating me.


void OnStart()
{
AddEntityCollideCallback("Player","statuefirst","collidestatuefirst",true,1);
AddEntityCollideCallback("Player","statuesecond","collidestatuesecond",true,1);
SetEntityPlayerInteractCallback("firstkey", "collidestatuethird", true);
AddEntityCollideCallback("Player","statuefourth","collidestatuefourth",true,1);
AddEntityCollideCallback("Player","statuefifth","collidestatuefifth",true,1);
SetEntityPlayerInteractCallback("kitchenkey", "collidestatuesixth", true);
SetEntityPlayerInteractCallback("musickey", "collidestatueseventh", true);
SetEntityPlayerInteractCallback("labkey", "collidestatueeighth", true);
SetEntityPlayerInteractCallback("sewer", "collidestatueninth", true);
}


void collidestatuefirst(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statueman1", false);
SetEntityActive("statueman2", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman2", 0, false);
}

void collidestatuesecond(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statueman2", false);
SetEntityActive("statueman3", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman3", 0, false);
}

void collidestatuethird(string &in EntityName, int alState)
{
SetEntityActive("statueman3", false);
SetEntityActive("statueman4", true);
PlaySoundAtEntity("", "10_rock_move.snt", "statueman4", 0, false);
}


and it's just that sort of flow until the end.. but I don't think it's anything to do with my script considering that the statues are all spawned at the beginning. Does anybody have any answers to why my statue entities may not be popping in and out when they should be?

Voice Actor - Male, British Accent, Mid-teens, Adaptable
Custom Stories - "The Heist: Amnesia" (In production)
(This post was last modified: 07-24-2012, 11:17 PM by HeadyBoy.)
07-24-2012, 05:42 AM
Find


Messages In This Thread
Entity is NOT supposed to be active - by HeadyBoy - 07-24-2012, 05:42 AM



Users browsing this thread: 1 Guest(s)