Whats the best method for respawning NPCs in an open-worldish game. I dont want NPCs magicaly coming back to life while youre in the middle of a mission, but i also dont want other players attempting the missions to be walking into rooms of corpses. And since its an open-world type game players will be able to cross paths so i cant really force respawn after mission completions, since there may be multiple players in the same area even if they may not be on the same exact mission
The game will be Hitman style where you have to stealth assassinate a certain target somewhere. But it will be in a city, instead of in preset mission areas. The city will function more in a GTA style with free roaming. A full day/night cycle and pathed NPCs that you have to track to find the best time to kill em! or just run up and shootem in the face, whatever u feel like doin <.<
anyway need ideas for how/when/where to best respawn the NPCs
ID:152013
May 23 2008, 11:07 pm
|
|
In response to Garthor
|
|
Garthor wrote:
> if(initial(loc)) Bad useless-double-proc-call-with-no-reason! Bad! =P var/init_loc = initial(loc) Indeed, you must have just accidentally missed this. But still, bad! |
In response to Kaioken
|
|
I feel that's slightly less clear. The point of the initial(loc) line is that it will be null if the mob was not placed using the map editor, and so it makes a reasonable "should this mob respawn?" check. An extra call to initial() isn't going to kill somebody.
|
In response to Garthor
|
|
Garthor wrote:
An extra call to initial() isn't going to kill somebody. Shhhh. =P You can be wrong sometimes too, y'know. Just like every other human. |
Keep in mind that you can break things by moving players out in nonstandard ways. This means deleting and altering loc directly. You'll need to remember to call Entered() and Exited() as appropriate in those cases.