Problems with non-despawning monster - 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: Problems with non-despawning monster (/thread-12732.html) |
Problems with non-despawning monster - Sazureth - 01-20-2012 Is it possible to set the monster not despawn when the player dies? (Or spawn a new monster with exactly the same name when the player respawns) RE: Problems with non-despawning monster - Tripication - 01-20-2012 Not sure, but if you try looping the path nodes, that might do the trick RE: Problems with non-despawning monster - Unearthlybrutal - 01-20-2012 Make a checkpoint and make it call a function when you die: Put there: Code: ResetProp("NAME OF THE ENEMY"); You'll need to make it active again and when its active, its in the same position as it were when the map started RE: Problems with non-despawning monster - Statyk - 01-20-2012 Or if you have the monster spawn on an area collide, make sure the "autoremove" is set to FALSE.. E.g... AddEntityCollideCallback("Player", "COLLIDEAREA", "MONSTERFUNCTION", false, 1); This allows the function to be called repeatedly, as the function is not deleted. Result, monster spawning after each death. RE: Problems with non-despawning monster - Your Computer - 01-21-2012 Monsters cannot be "respawned" if the player is killed by the monster within the same map session. You have to either reload the map or have another monster with a different name waiting to be enabled afterwards. RE: Problems with non-despawning monster - Krymtel - 01-21-2012 Try this maybe: void SetEnemyDisabled(string& asName, bool abDisabled); As in... void SetEnemyDisabled("NAME OF ENEMY", true); Or, if it's part of a function... SetEnemyDisabled("NAME OF ENEMY", true); RE: Problems with non-despawning monster - Sazureth - 01-22-2012 Your Computer really answered my question, thank you. This means that I'm just going to make two version of the same map file and have a loading screen when the player dies.. Thanks for help! |