Frictional Games Forum (read-only)
Help with inactive statue - 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: Help with inactive statue (/thread-22651.html)

Pages: 1 2


Help with inactive statue - EddieShoe - 08-30-2013

I've added an inactive statue on my map, I've double-checked that it has been set to inactive but still every time I try to make it appear by entering a trigger area it is already there. I have tried adding a script to set it to inactive on map entry but it does not work as well, he is still there before entering the script area. Any ideas? Here's my script file:

Code:
////////////////////////////
// Run first time starting map
void OnStart()
{
    AddEntityCollideCallback("Player", "PlateBreak", "BreakPlate", true, 1);
    AddEntityCollideCallback("Player", "Footstep", "Footsteps", true, 1);
    AddEntityCollideCallback("Player", "TriggerVoice", "VoiceTrigger", true, 1);    
    SetEntityActive("ManScare", false);
}

void BreakPlate(string &in asParent, string &in asChild, int alState)
{
    AddTimer("timer01", 1.5f, "BreakPlate1");
    PlaySoundAtEntity("", "scare_tingeling.snt", "Player", 0, false);
}

void Footsteps(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "scare_steps_big.snt", "candlestick_wall_10", 0, false);
}

void BreakPlate1(string &in asTimer)
{
    SetPropHealth("plate_9", 0);
    SetPropHealth("plate_3", 0);
    SetPropHealth("plate_8", 0);
    AddPropImpulse("chair_nice02_8", 4, 8, 0, "world");
    AddPropImpulse("chair_nice02_11", 6, 10, 0, "world");
    AddPropImpulse("chair_nice02_1", 0, 0, -14, "world");
    GiveSanityDamage(3, true);    
}

void ManScream(string &in asEntity, int alState)
{
    PlaySoundAtEntity("", "scare_male_terrified5.snt", "Player", 0, false);
    GiveSanityDamage(5, true);
}

void VoiceTrigger(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("ManScare", true);
    PlaySoundAtEntity("", "enemy_hallucination_disappear.snt", "Player", 0, false);
    AddTimer("timer02", 1.0f, "RemoveMan1");
}

void RemoveMan1(string &in asTimer)
{
    SetEntityActive("ManScare", false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
    StopMusic(0,1);
    PlayMusic("02_amb_strange.ogg", true, 1, 4, 0, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}



RE: Help with inactive statue - Kurton - 08-30-2013

Most likely it's set as 'StaticProp' in the Model Editor, inhibiting any kind of script interaction. Change it to Object, subtype Static, and save it as a new entity that you include in your custom story folder.


RE: Help with inactive statue - FlawlessHappiness - 08-30-2013

That's because the statue is a static object.

You will have to change that in the model editor. Then add the new file to the "entity"-folder in your custom story

Ninjad


RE: Help with inactive statue - DeAngelo - 08-30-2013

Assuming it doesn't ever need to go back to being inactive, you could use the CreatePropAtArea (Not sure if that's the exact script, check the wiki) and put a script area where you want.


RE: Help with inactive statue - EddieShoe - 08-30-2013

Okay, I've made it a object and added a "entities" folder in my custom story where I saved it, but how do I add it in the editor now? I've googled but with no results.

EDIT: I actually thought a bit and realized how easy it was. However, even though it's an object now it is still visible when I open the door, even before entering the area. I cna confirm it's set to an object because I can see more options in the "entity" tab when having it selected. Everything else (the sound, etc) works perfectly when running into the script area.


RE: Help with inactive statue - PutraenusAlivius - 08-31-2013

Check the ACTIVE box in the entity's properties.


RE: Help with inactive statue - EddieShoe - 08-31-2013

In the model editor or in the level editor? Because it's already set to inactive in the level editor and it's transparent in the 3d view.


RE: Help with inactive statue - PutraenusAlivius - 08-31-2013

Can I take a look to your model?


RE: Help with inactive statue - EddieShoe - 08-31-2013

I've uploaded the map file with scripts and the model here. I messed around a lot now so it might look messy in the .hps file. Thanks for the help!


RE: Help with inactive statue - Your Computer - 09-01-2013

Did you give the ENT a different file name than the original and then replace the one in the map with that one?