Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Script area does not activate
Author Message
Peldan Offline
Junior Member

Posts: 16
Joined: Mar 2012
Reputation: 0
Post: #1
Script area does not activate

Hello guys.
See, I've got a really simple problem. It's weird how it won't work!

My script area doesn't activate when the Player collides with it.

Here's the code:
PHP Code: (Select All)
void OnStart()
{    
AddEntityCollideCallback("Player""ScriptArea_1""SpawnBrute"true1);
AddEntityCollideCallback("brute""BruteDeSpawn""DeSpawnBrute"true1);    
AddEntityCollideCallback("Player""brutescare""BruteWalk"true1);
}
void SpawnBrute(string &in asParentstring &in asChildint alState)
{    
AddDebugMessage("Scriptarea works"true);    
SetEntityActive("brute"true);    
PlaySoundAtEntity("""notice.snt""brute"0false);    
PlayMusic("search_brute.ogg"true0.8f00true);    
SetMessage("SetMessage""SM_Malo"0);    
AddEnemyPatrolNode("brute""PathNodeArea_1"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_2"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_3"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_4"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_5"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_6"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_7"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_8"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_9"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_10"0.1f"");    
AddEnemyPatrolNode("brute""PathNodeArea_11"0.1f"");
}
void DeSpawnBrute(string &in asParentstring &in asChildint alState)
{    
SetEntityActive("brute"false);    
StopMusic(1.0f0);    
SetMessage("SetMessage""SM_MaloGone"0);
}
void BruteWalk(string &in asParentstring &in asChildint alState)
{    
SetEntityActive("bruteoutside"true);    
PlaySoundAtEntity("""notice.snt""bruteoutside"0false);
PlayMusic("search_brute.ogg"true0.8f00true);    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_12"0.1f"");    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_13"0.1f"");    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_14"0.1f"");    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_15"0.1f"");    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_16"0.1f"");    
AddEnemyPatrolNode("bruteoutside""PathNodeArea_17"0.1f"");
}
void OnEnter(){
}
void OnLeave(){



The script is named ScriptArea_1 and is correctly placed. Here's a pic:
[Image: tEjvW.jpg]
(This post was last modified: 03-10-2012 12:39 PM by Peldan.)
03-10-2012 12:37 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Script area does not activate - Peldan - 03-10-2012 12:37 PM
RE: Script area does not activate - Peldan - 03-10-2012, 01:01 PM
RE: Script area does not activate - Peldan - 03-10-2012, 01:25 PM
RE: Script area does not activate - Peldan - 03-10-2012, 01:39 PM
RE: Script area does not activate - Peldan - 03-10-2012, 01:53 PM
RE: Script area does not activate - Peldan - 03-10-2012, 02:07 PM
RE: Script area does not activate - Peldan - 03-10-2012, 02:16 PM
RE: Script area does not activate - Peldan - 03-10-2012, 02:21 PM
RE: Script area does not activate - Peldan - 03-10-2012, 02:27 PM
RE: Script area does not activate - Peldan - 03-10-2012, 02:34 PM
RE: Script area does not activate - Peldan - 03-10-2012, 03:01 PM



User(s) browsing this thread: 1 Guest(s)