Frictional Games Forum (read-only)
Changing Entities - 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: Changing Entities (/thread-15972.html)



Changing Entities - MaZiCUT - 06-08-2012

Hello, i have no idea because i haven't seen anyone do this before but maybe someone knows how to pull this off.
What i want to achieve is this

When player collides with an area, he freezes (achieved)

The lights die (achieved)

A brute spawns and comes towards you to start a dialouge (not achieved)

The lights go back on (not achieved)



Can someone please help me? This means alot to me and i want this to be a fun experience for the players of my custom story that's why it has so much demandings. Please help me in order of the list, mainly i need help with getting the lights back on and the brute not killing you but just standing still and text comes up as if player and brute is talking to eachother.

bumpadump Sad


RE: Changing Entities - Your Computer - 06-08-2012

You have to disable triggers for the brute for it to not attack the player. You should have a script area where the brute is supposed to stand at for collision detection. Then when the monster collides with the area, use effect voices and set an effect voice callback to have the effect voice callback trigger when the brute is done speaking. In the callback you just turn on the lights.


RE: Changing Entities - MaZiCUT - 06-08-2012

(06-08-2012, 06:27 PM)Your Computer Wrote: You have to disable triggers for the brute for it to not attack the player. You should have a script area where the brute is supposed to stand at for collision detection. Then when the monster collides with the area, use effect voices and set an effect voice callback to have the effect voice callback trigger when the brute is done speaking. In the callback you just turn on the lights.
I haven't got far enough with voice actors so i'm just going to make him roarr when he goes collides with an area standing infront of his pathnode, can you help me script that effect dear friend? Smile

AddEntityCollideCallback("servant_brute_1", "BruteCollide", "Rawr", true, 1);

void Rawr()
{

}


RE: Changing Entities - lllDash - 06-08-2012

{

AddEntityCollideCallback("servant_brute_1", "BruteCollide", "Rawr", true, 1);
}

void Rawr(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisableTriggers("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 5.0f, "");
}



I've never used "SetEnemyDisableTriggers" before but theoretically it should work according to http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

and also to make him roar, you'll need to give him an animation for when he reaches the pathnode. read this: (also found in http://wiki.frictionalgames.com/hpl2/amnesia/script_functions)

AddEnemyPatrolNode(string& asName, string& asNodeName, float afWaitTime, string& asAnimation);

asName - internal name of the enemy
asNodeName - path node
afWaitTime - time in seconds that the enemy waits at the path node before continuing
asAnimation - the animation the enemy uses when reaching the path node