Frictional Games Forum (read-only)
[CHAOS] Script Area won't trigger - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [CHAOS] Script Area won't trigger (/thread-12939.html)



Script Area won't trigger - Gamemakingdude - 01-29-2012

Hi, i have made an script area and it will not trigger.

PHP Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
    
//Add the Lantern and 10 Tinderboxes when in Debug mode, always good to have light!
    
if(ScriptDebugOn())
    {
        
GiveItemFromFile("lantern""lantern.ent");
 
        for(
int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i"tinderbox.ent");
    }
    
AddEntityCollideCallback("Player","ScriptArea_1","FlashScare",false,1);
    for (
int x 13x++) {
        
AddEnemyPatrolNode("male_arm_1""PathNodeArea_"+x0"");
        }
}

void FlashScare(string &in asParentstring &in asChildint alState)
{
    
ShowEnemyPlayerPosition("male_arm_1");
    
AddDebugMessage("Information",false);
    
}
    

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntity,false,true);
    
PlaySoundAtEntity("","unlock_door"asEntity0false);
    
RemoveItem(asItem);
    if (
asEntity == "cabinet_metal_1") {
        
SetEntityActive("block_box_1",false);
        }
}


    
////////////////////////////
// Run when entering map
void OnEnter()
{
 
}
 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


Anyone know why?


RE: Script Area won't trigger - Gamemakingdude - 01-29-2012

Nevermind fixed it myself.


RE: Script Area won't trigger - flamez3 - 01-29-2012

(01-29-2012, 04:36 PM)Gamemakingdude Wrote: Nevermind fixed it myself.
Bull