ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Spawning dead bodies via script

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  20:31:48  25 October 2012
profilee-mailreply Message URLTo the Top
ddraig
Senior Resident
 

 
On forum: 06/19/2012
Messages: 158
Spawning dead bodies via script

I pretty much understand the concept of spawning live npcs using the alife():create function but I'm wondering how exactly you are able to spawn an npc that is dead upon spawning, preferably with a set inventory.

Anyone able to clarify?
  02:59:35  26 October 2012
profilee-mailreply Message URLTo the Top
FatalFunnel
(Senior)
 
On forum: 11/07/2011
Messages: 133
I don't know anything about how this works, but I do know that the game does this. Certain NPCs spawn as corpses in the game, it's referenced in the character_desc files, so there has to be some script that spawns them that way.
  06:43:06  26 October 2012
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
Corpses are spawned by setting their heath to zero in the sdk. You could try spawning them then forcing them online then killing them.
  12:17:06  26 October 2012
profilee-mailreply Message URLTo the Top
_dAVROs_
(Senior)
 
On forum: 08/03/2010
Messages: 116
Setting NPC health

@ddraig
here is the basic script;

local se_obj = alife() bject(obj:name())
amk_offline_alife.set_npc_health(se_obj, 0)

(Used with AMK variants)

hope it gives you few ideas. Ive used it in StalkerSoup
  14:40:05  26 October 2012
profilee-mailreply Message URLTo the Top
ddraig
Senior Resident
 

 
On forum: 06/19/2012
Messages: 158
Ah, cool, so there's a function in AMK/Stalkersoup that will set an NPC's health to zero? This is great, and just what I was looking for.

I was looking at a few other mods like OGSE and it has a "safely destroy npc" function that looks a bit too complicated for my exact purpose.
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2020 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.