Frictional Games Forum (read-only)
[LVL ED] A couple things I need help with. - 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: [LVL ED] A couple things I need help with. (/thread-14325.html)



A couple things I need help with. - kiruclanz - 03-29-2012

So yeah, I've looked up many tutorials, google searched for hours etc. And cannot find a couple things I need help with.

Monster triggers
The PlayerCollide trigger that spawns a monster. I only know how to make the monster spawn by clicking on the trigger. What I want is when you step/walkthrough it, the monster will spawn.

Trigger hurt
Basic. When you walk through a certain trigger it causes you to lose health.

Can anyone tell me how to do those?



RE: A couple things I need help with. - Obliviator27 - 03-29-2012

AddEntityCollideCallback is how you would make both work.
AddEntityCollideCallback("Player", "AreaName", "FunctionName", true, 1);



RE: A couple things I need help with. - Xanthos - 03-29-2012

void FUNCTIONNAME(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("MOBNAME", true);

AddEnemyPatrolNode("MOBNAME", "PATHNODENAME", 1, "");
AddEnemyPatrolNode("MOBNAME", "SECONDPATHNODENAME", 1, "");

AddEnemyPatrolNode("MOBNAME", "THIRDPATHNODENAME", 1, "");

AddEnemyPatrolNode("MOBNAME", "FOURTHPATHNODENAME", 1, "");

}

And I only know how to make the script hurt you this way

SetPlayerHealth(float afHealth);
AddPlayerHealth(float afHealth);

Or fiddle with this


GivePlayerDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal);
//Reduces the health of the player.

//afAmount - amount of damage done to health
//asType - plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash)
//abSpinHead - changes the camera view when damage is dealt
//abLethal - set to true if player can die from given damage

I still cant get it working