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 Problem
TimmayIsHawt Offline
Junior Member

Posts: 20
Threads: 9
Joined: Jul 2011
Reputation: 0
#1
Tongue  Script Problem

Hey guys, I need a little help on my scripts, so... I'm pretty much making a basic map (since I'm new to this) and for some reason my script won't read the triggers/areas when i walk into them. Huh

Here's the script ~
Quote://==========================================
// This runs when the map firsts starts
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_One", "enemy1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Two", "enemy2", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Three", "enemy3", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Four", "enemy4", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Five", "enemy5", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Six", "enemy6", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_Seven", "enemy7", true, 1);
}

void enemy1(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 10, "");
}

void enemy2(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2`", "PathNodeArea_2", 10, "");
}

void enemy3(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_3", true);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_3", 10, "");
}

void enemy4(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_6", true);
AddEnemyPatrolNode("servant_grunt_6", "PathNodeArea_3", 10, "");
}

void enemy5(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_4", true);
AddEnemyPatrolNode("servant_grunt_4", "PathNodeArea_4", 10, "");
}

void enemy6(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_5", true);
AddEnemyPatrolNode("servant_grunt_5", "PathNodeArea_5", 10, "");
}

void enemy7(string &in asParent, string &in asEntity)
{
SetEntityActive("servant_grunt_7", true);
SetEntityActive("servant_grunt_8", true);
SetEntityActive("servant_grunt_9", true);
SetEntityActive("servant_grunt_10", true);
SetEntityActive("servant_grunt_11", true);
SetEntityActive("servant_grunt_12", true);
SetEntityActive("servant_grunt_13", true);
SetEntityActive("servant_grunt_14", true);
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_grunt_7", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_8", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_9", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_10", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_11", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_12", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_13", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_grunt_14", "PathNodeArea_6", 10, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 10, "");
}

Yeah, i don't know how to explain it any further due to the fact that i have no ideawhy it isn't working Confused
07-11-2011, 11:19 AM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Script Problem

change every occurance of
(string &in asParent, string &in asEntity)
to
(string &in asParent, string &in asChild, int alState)

and it should work.
07-11-2011, 11:34 AM
Find
ferryadams11 Offline
Junior Member

Posts: 17
Threads: 1
Joined: Apr 2011
Reputation: 0
#3
RE: Script Problem

Haha, sorry I'm saying this but that's a bit noobish cause it is all explained very well in MrBigzy's scripting function descriptions. ;P hope to see your map soon.
07-11-2011, 08:39 PM
Find
TimmayIsHawt Offline
Junior Member

Posts: 20
Threads: 9
Joined: Jul 2011
Reputation: 0
#4
RE: Script Problem

Yeah well, i mostly rely on youtube video's to help me. Forums are my last option if i can't figure how to work it out. I also started yesterday :O
07-11-2011, 09:02 PM
Find
ferryadams11 Offline
Junior Member

Posts: 17
Threads: 1
Joined: Apr 2011
Reputation: 0
#5
RE: Script Problem

Ah, that so. Smile

Keep me up to date at this thread with screenshots of your map
07-12-2011, 07:06 PM
Find




Users browsing this thread: 1 Guest(s)