NatVac wrote:Well, I'm not as knowledgeable on smart terrains as EggChen and barin, but I made the mistake of interrupting EggChen's answer, apparently.
I bet you are buddy, I'm a hacker!! Don't worry about interrupting my response, it's my bad for not getting around to it. Work has been reassuringly busy in these economic times, and I have not had much free time.
"All work and no play makes Egg a dull boy"....
I'd agree with what
Natvac has posted so far, but much of what I "know" about all.spawn is from educated guesses, so you could say I "think I know" how to do it!!
Brapped - Your example looks fine, apart from this part :
shape0 ffset = 0,0,0
I'm guessing it is a forum formatting problem (possibly from GSC where you first posted this) rather than an error, but worth checking anyway. Some other things to consider, and remember these are my thoughts, I'm not 100% on any of it!!
1) I think respawning is limited by capacities of smart terrains as
Natvac mentions. To test this, try adding things you know should work, like a monolith spawn. They will spawn and head for their nearest smart terrain, but if you see any between Escape and the Bar, you should know that the spawn is working. If that works, then try the strangers again, but let them share all the terrains in Cordon ("community = stalker, stranger" in all.spawn). Also add them to the gulag script where appropriate.
2) I think respawns are limited by actor proximity. So don't hang around that area waiting to see any, move around, and especially change levels.
3) You need to start a new game every time you change something in all.spawn (I'm sure you know this, but always worth mentioning).
4) Make a crude debug, so you know if it works. Adding a respawn for a hitman novice, but giving him an invalid mesh in the config/gameplay/character_desc_xxxx files should do it. Now when he spawns (and comes online) you will get a crash pointing at the mesh. Maybe call it woohooitworks.ogf!!
Edit: Scripting is by far the most sure fire way of spawning, and it may be worth investigating the MonoMartyr approach instead. I like all.spawn because things are more random (or at least they seem to be).
I have a tweaked version of Fatrap's script that could partially achieve what you want. It does a math.random calculation before spawning, so you could get up to 10 variations of dogs, rats, strangers, or military. You could however remove most of these, giving a reduced chance of spawning strangers in a very crude way.
- Code: Select all
elseif level == "l04u_labx18" and has_alife_info("esc_darklab_documents_read") then
local f = math.random(1,20)
local spawnf1 = vector():set(-2.04, -14.82, 78.09)
local spawnf2 = vector():set(39.62, -9.28, 4.30)
local spawnf3 = vector():set(-44.49, -11.48, -20.69)
local spawnf4 = vector():set(25.70, -14.82, 71.28)
if f == 1 then
alife():create("m_poltergeist_normal_tele", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_poltergeist_normal_tele", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_poltergeist_normal_tele", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 2 then
alife():create("zombie_weak", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("zombie_normal", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("zombie_strong", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("zombie_immortal", spawnf4, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 3 then
alife():create("m_tushkano_e", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf4, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("m_tushkano_e", spawnf4, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 4 then
alife():create("sim_stranger_respawn_3", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 5 then
alife():create("sim_stranger_respawn_3", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 6 then
alife():create("sim_stranger_respawn_3", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 7 then
alife():create("sim_stranger_respawn_3", spawnf4, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 8 then
alife():create("gigant_normal", spawnf4, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 9 then
alife():create("bloodsucker_normal", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("bloodsucker_strong", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("bloodsucker_normal", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
elseif f == 10 then
alife():create("val_bandit_respawn_guard", spawnf1, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("val_bandit_respawn_guard", spawnf2, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
alife():create("val_bandit_respawn_guard", spawnf3, db.actor:level_vertex_id() , db.actor:game_vertex_id() )
end
return true
You could comment out as many or as few as you wanted to give a 10%, 20% chance etc. You can also randomise where they spawn in a level.