What would be really cool is that everytime the Spawn Trigger goes on, a pawn would be spawned again if it wasn't already spawned.
You could not only use it for monsters, but for regular pawns, too:
-make an AreaSwitchEntity
-make its szEntityName the SpawnTrigger of the pawn
-make a 'NOT' LogicGateEntity that inverses the state of the AreaSwitchEntity.
-use the AttributeOrder command (using the 'NOT' LogicGate for your pawn) to check if the player is far eneough to destroy the pawn's body and script. (Remove(true) command)
This could really help to emulate large cities with, maybe 100? maybe 200? maybe 500? poeple...
[OBSOLETE] Respawning?
[OBSOLETE] Respawning?
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
If you remove a pawn and replace it with another pawn it's no more resource intensive than if you just teleport the original pawn. If anything the second method is less because it doesn't have to reload the pawn. Instead it just moves it to a new location.
Then if it dies you could have it play it's death animation, teleport, and then get up again.
Because even for a city you don't want any kind of random pawn spawning. Because you lose control over your frames per second that way. In a levels design you should have worked out exactly how many pawns you can run at one time without bogging the game down.
Rather than build some sort of script to limit the number of pawns which will require more processing. It's better just to have X number of pawns that teleport around.
Could even have like a chnge material on them with multiple skins so that each time the pawn teleports it looks like a totally different person. That way the same guy in a blue shirt doesn't walk down the street every 5 minutes.
Then if it dies you could have it play it's death animation, teleport, and then get up again.
Because even for a city you don't want any kind of random pawn spawning. Because you lose control over your frames per second that way. In a levels design you should have worked out exactly how many pawns you can run at one time without bogging the game down.
Rather than build some sort of script to limit the number of pawns which will require more processing. It's better just to have X number of pawns that teleport around.
Could even have like a chnge material on them with multiple skins so that each time the pawn teleports it looks like a totally different person. That way the same guy in a blue shirt doesn't walk down the street every 5 minutes.