Page 1 of 1

[OBSOLETE] Respawning?

Posted: Mon Sep 05, 2005 4:25 pm
by Jay
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...

Posted: Mon Sep 05, 2005 6:57 pm
by Nout
Respawn means you spawn the same pawn again, correct?
If so, why don't you simply teleport the pawns
=> this command is available and there is no need to remove any pawn

Posted: Mon Sep 05, 2005 7:05 pm
by Jay
The thing i am getting at is that a removed pawn has no script running, which saves cpu ressources

Posted: Mon Sep 05, 2005 9:33 pm
by ZenBudha
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.

Posted: Mon Sep 05, 2005 9:50 pm
by AndyCR
great idea - maybe modify scale too, so one street theres a fat guy in a blue shirt, another theres a skinny dude in a yellow shirt, yet they're the same guy.

Posted: Sat Sep 10, 2005 5:16 pm
by Jay
ok...i'll try that.