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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Issues Help Monster Path
assassinhawk45 Offline
Junior Member

Posts: 31
Threads: 11
Joined: Dec 2012
Reputation: 0
#1
Monster Path

I have been trying to set a monster and its path nodes. When I open the map, it just stands there. Another problem that I am having is that when ever I put a monster in, it always looks along the x-axis, even though it has been rotated in the editor.
Any ways here is my script. I have already checked the names of everything.
////////////////////////////
// Run when starting map
void OnStart()
{
SetEntityCallbackFunc("tinder", "OnPickup");    
SetEntityCallbackFunc("scroll", "OnPickup2");
AddEntityCollideCallback("Player", "trigger", "monster", true, 1);
AddEntityCollideCallback("servant_grunt_1", "disable", "disable", true, 1);
}
void OnPickup(string &in asEntity, string &in type)
{
  SetEntityActive("body", true);
  PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
    AddTimer("", 0.7, "scared");
}
void scared(string &in asTimer)
{
SetEntityActive("body", false);
}
void OnPickup2(string &in asEntity, string &in type)
{
SetEntityActive("fish", true);
PlaySoundAtEntity("", "impact_water_high.snt", "Player", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
GiveSanityDamage(15, true);
AddTimer("", 0.4, "look");
}
void look(string &in asTimer)
{
StartPlayerLookAt("fish", 3, 5, "");
}
void monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_10", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PosNodeArea_19", 0, "");
}
void disable(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
AutoSave();
}[/code]
If you can spot what I did wrong, I'd appreciate it.

The Necromancer's Touch: WIP Coming March 2013
(This post was last modified: 02-08-2013, 03:09 AM by assassinhawk45.)
02-08-2013, 03:08 AM
Find


Messages In This Thread
Monster Path - by assassinhawk45 - 02-08-2013, 03:08 AM
RE: Monster Path - by palistov - 02-08-2013, 06:41 AM
RE: Monster Path - by PutraenusAlivius - 02-08-2013, 07:17 AM
RE: Monster Path - by NaxEla - 02-08-2013, 07:31 AM
RE: Monster Path - by No Author - 02-08-2013, 06:52 AM
RE: Monster Path - by MulleDK19 - 02-08-2013, 07:22 AM
RE: Monster Path - by No Author - 02-08-2013, 08:21 AM
RE: Monster Path - by assassinhawk45 - 02-08-2013, 09:32 PM



Users browsing this thread: 1 Guest(s)