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
Enemy path script issue
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Enemy path script issue

void OnStart()
{
SetEntityPlayerInteractCallback("Monster_Key_1", "Spawn_Monster", true);
}

void Spawn_Monster(string &in entity)
{
SetEntityActive("servant_brute_1", true);
void AddEnemyPatrolNode("servant_grunt_1", "Node_1", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_2", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_3", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_4", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_5", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_6", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_5", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_4", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_3", 0,"");
void AddEnemyPatrolNode("servant_grunt_1", "Node_2", 0,"");
}

void MosterEnd(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("servant_grunt_1", false);
}

Angelscript was interpreting the "float 0" as an attempted cast, which, incidentally, would be written "float(0)". This is not necessary, as the game can implicitly cast from integers to floats correctly.

Edit:
The "asEntity" correction is unnecessary, you can call your identifiers anything as long as the function signature is correct - you could call it "giantMarshmellow" without a problem, if you really wanted Wink.
(This post was last modified: 08-05-2011, 10:37 PM by Apjjm.)
08-05-2011, 10:33 PM
Find


Messages In This Thread
Enemy path script issue - by Synestral - 08-05-2011, 10:10 PM
RE: Enemy path script issue - by MrCookieh - 08-05-2011, 10:22 PM
RE: Enemy path script issue - by Apjjm - 08-05-2011, 10:33 PM



Users browsing this thread: 1 Guest(s)