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
Game Logic Question and Script Help
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#1
Game Logic Question and Script Help

After a monster has gone through all of it's pathnodes, will it disappear automatically?

And you'll be glad to know I'm this close |--| to completing the forth level (: Just gotta add little decor. tweaks like decals, furnature and storage decorations for that extra spice (;

Also, what's wrong with this script?

Spoiler below!

void OnStart()
{
SetEntityPlayerInteractCallback("ScareDoor_1", "ScareDoorScript", true);
AddUseItemCallback("ToTheNextLevelDoor_1", "ToTheNextLevelDoorKey_1", "UsedKeyOnDoor", true);
SetEntityPlayerInteractCallback("BooDoor_1", "BooSpawn", true);
}

void OnEnter()
{
}

void OnLeave()
{
}

void ScareDoorScript(string &in asEntity)
{
AddPropImpulse("ScareDoor_1", 0, 0, 5, "World");
    PlaySoundAtEntity("", "21_bang_door.snt", "ScareDoor_1", 0, false);
    PlaySoundAtEntity("", "21_intro_scream.snt", ScareDoor_1", 0, false);
SetSwingDoorLocked("SacreDoor_1", false, true);
}

void BooSpawn(string &in asEntity)
{
SetEntityActive("MrBoo_1", true);
    AddEnemyPatrolNode("MrBoo_1", "Node_1", 1, "");
    AddEnemyPatrolNode("MrBoo_1", "Node_2", 1, "");
    AddEnemyPatrolNode("MrBoo_1", "Node_3", 1, "");
    AddEnemyPatrolNode("MrBoo_1", "Node_4", 2, "");
    AddEnemyPatrolNode("MrBoo_1", "Node_5", 2, "");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("ToTheNextLevelDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", 0, false);
}


"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 08-01-2011, 08:39 PM by ObsidianLegion.)
08-01-2011, 08:28 PM
Find


Messages In This Thread
Game Logic Question and Script Help - by ObsidianLegion - 08-01-2011, 08:28 PM
RE: Game Logic Question and Script Help - by Kyle - 08-01-2011, 08:52 PM



Users browsing this thread: 1 Guest(s)