Frictional Games Forum (read-only)
[SCRIPT] Script area does not activate - 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: [SCRIPT] Script area does not activate (/thread-13895.html)

Pages: 1 2 3


RE: Script area does not activate - Peldan - 03-10-2012

(03-10-2012, 02:34 PM)flamez3 Wrote: delete second.map_cache
Done it several times. Trying it again..

Still nothing! Scripts do work on my first map, though.


EDIT: Okay, seems like the map script itself doesn't even work, at all. SetMessage and AddDebugMessage in OnStart doesn't work either.

EDIT2: Alright, renamed the custom story name and the map and script names aswell. My old script somehow REPLACED the new one, out of nowhere. My custom stories are really glitchy..

Oh well, now I have the old script, and the Justine monster is appearing. Here's the script now:
PHP Code:
void OnStart()
{
    
AddEntityCollideCallback("Player""ScriptArea_Malo""SpawnMalo"true1);
    
AddEntityCollideCallback("malo""MaloDeSpawn""DeSpawnMalo"true1);
}

void SpawnMalo(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("""notice_long.snt""malo"0false);
    
PlayMusic("search_suitor.ogg"true0.8f00true);
    
SetMessage("SetMessage""SM_Malo"0);
    
SetEntityActive("malo"true);
    
SetSwingDoorClosed("sewer_arched_1"truetrue);
    
AddEnemyPatrolNode("malo""PathNodeArea_1"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_2"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_3"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_4"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_5"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_6"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_7"0.1f"");
    
AddEnemyPatrolNode("malo""PathNodeArea_8"0.1f"");
}

void DeSpawnMalo(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("malo"true);
    
StopMusic(1.0f0);
    
SetMessage("SetMessage""SM_MaloGone"0);
}

void OnEnter()
{

}

void OnLeave()
{





RE: Script area does not activate - flamez3 - 03-10-2012

Do you need any more help?


RE: Script area does not activate - Peldan - 03-10-2012

Well, somehow the old map gets loaded by the level door on map one, even though I changed the map that should be loaded, and all that. I guess I will reinstall or try on another computer, bye for now and thanks for the help! Big Grin