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
Activate Entity
Cgturner Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2010
Reputation: 0
#1
Activate Entity

I have a scenario where a dog's head is created and falls out of a window, then, once you interact with the dog's head, the door behind you slams closed and is locked. I also have it set so that if you interact with the door after it is locked, an enemy is spawned behind you, but the enemy never spawns. The game runs fine, all except for the enemy spawning.

Here is my code:

void OnStart ()
{
    SetEntityPlayerInteractCallback("cellar_wood01_1", "InteractGrunt", true);
}

void InteractGrunt (string &in asEntity)
{
    if (GetSwingDoorLocked("cellar_wood01_1") == true)
        ActivateGrunt();
}

void ActivateGrunt()
{
    SetEntityActive("servant_grunt_1", true);
}

I have the correct callback function attached to the door in the level editor, but the function still doesn't work.
10-18-2010, 05:28 AM
Find


Messages In This Thread
Activate Entity - by Cgturner - 10-18-2010, 05:28 AM
RE: Activate Entity - by jens - 10-18-2010, 05:42 AM
RE: Activate Entity - by Cgturner - 10-18-2010, 05:48 PM
RE: Activate Entity - by jens - 10-18-2010, 08:02 PM
RE: Activate Entity - by Cgturner - 10-19-2010, 05:33 AM



Users browsing this thread: 1 Guest(s)