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 Help Script area does not activate
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Script area does not activate

Do any other scripts work?
(03-10-2012, 12:45 PM)Stepper321 Wrote: I recommend doing everything with callback on enter Smile


PHP Code: (Select All)
void OnStart(){

}
void OnEnter()
{    
AddEntityCollideCallback("Player", "ScriptArea_1", "SpawnBrute", true, 1);
AddEntityCollideCallback("brute", "BruteDeSpawn", "DeSpawnBrute", true, 1);    
AddEntityCollideCallback("Player", "brutescare", "BruteWalk", true, 1);
}
void SpawnBrute(string &in asParent, string &in asChild, int alState)
{    
AddDebugMessage("Scriptarea works", true);    
SetEntityActive("brute", true);    
PlaySoundAtEntity("", "notice.snt", "brute", 0, false);    
PlayMusic("search_brute.ogg", true, 0.8f, 0, 0, true);    
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 asParent, string &in asChild, int alState)
{    
SetEntityActive("brute", false);    
StopMusic(1.0f, 0);    
SetMessage("SetMessage", "SM_MaloGone", 0);
}
void BruteWalk(string &in asParent, string &in asChild, int alState)
{    
SetEntityActive("bruteoutside", true);    
PlaySoundAtEntity("", "notice.snt", "bruteoutside", 0, false);
PlayMusic("search_brute.ogg", true, 0.8f, 0, 0, true);    
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(){
} 
Thast honestley, would not change a thing/


(This post was last modified: 03-10-2012, 12:51 PM by flamez3.)
03-10-2012, 12:51 PM
Find


Messages In This Thread
Script area does not activate - by Peldan - 03-10-2012, 12:37 PM
RE: Script area does not activate - by Stepper321 - 03-10-2012, 12:45 PM
RE: Script area does not activate - by ingedoom - 03-10-2012, 12:50 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 01:01 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 12:51 PM
RE: Script area does not activate - by Stepper321 - 03-10-2012, 01:21 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 01:25 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 01:39 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 01:39 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 01:49 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 01:53 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 01:58 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 02:07 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 02:13 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 02:16 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 02:18 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 02:21 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 02:24 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 02:27 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 02:34 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 02:34 PM
RE: Script area does not activate - by flamez3 - 03-10-2012, 02:56 PM
RE: Script area does not activate - by Peldan - 03-10-2012, 03:01 PM



Users browsing this thread: 2 Guest(s)