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 not working?
cheztheguy Offline
Junior Member

Posts: 12
Threads: 7
Joined: Jun 2011
Reputation: 0
#1
Script not working?

Hello everyone...
it seems that I tried to put a script area but when the player collides into it, the script doesn't show up.

Here is my script

Spoiler below!
void OnStart()
{
SetEnemyDisableTriggers("servant_grunt_1", true);
SetEntityActive("servant_grunt_2", false);
SetMoveObjectState("Gruntwalkdoor", 1.0f);
AddEntityCollideCallback("walkgrunt", "Player", "WalkGruntDoor", false, 0);
}

void WalkGruntDoor(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", true);
SetEnemyDisableTriggers("servant_grunt_2", true);
StartPlayerLookAt("servant_grunt_2", 7.0f, 50.0f, "");
StopPlayerLookAt();
GiveSanityDamage(30.0f, true);
AddEntityCollideCallback("servant_grunt_2", "DoorGruntGone", "GruntGone", false, 0);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0.0f, "");
}

void GruntGone(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_2", false);
SetMoveObjectStateExt("Gruntwalkdoor", 0, 7.0f, 50.0f, 0.0f, true);
}


Here are some screenshots of the editor:
Spoiler below!

[Image: walkgruntscript.png]

[Image: walkgruntscript2ug.png]

[Image: walkgruntscript3.png]



What am I doing wrong?
(This post was last modified: 05-28-2012, 06:06 AM by cheztheguy.)
05-28-2012, 05:52 AM
Find


Messages In This Thread
Script not working? - by cheztheguy - 05-28-2012, 05:52 AM
RE: Script not working? - by Putmalk - 05-28-2012, 05:59 AM
Re: Script not working? - by cheztheguy - 05-28-2012, 06:05 AM
RE: Script not working? - by Putmalk - 05-28-2012, 06:56 AM



Users browsing this thread: 1 Guest(s)