Frictional Games Forum (read-only)

Full Version: A couple things I need help with.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
AddEntityCollideCallback is how you would make both work.
AddEntityCollideCallback("Player", "AreaName", "FunctionName", true, 1);
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