ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
How i can ask is an NPC in a space_restrictor?

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  15:45:39  1 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
 

Message edited by:
olaf1
07/01/2012 17:43:37
Messages: 240
How i can ask is a NPC in a space_restrictor?

I will ask per script whether a npc (not a spezial npc) is in a space_restrictor.

But i don´t know how i can make this.

I hope you can say me that.

Thank you

p.s. i know that i can ask if an spezial NPC´s in zone with that script but not no matter what npc is in a zone


zone:inside(npc:position())

  12:52:02  2 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
Messages: 240
can nobody help me????
  22:48:49  2 July 2012
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
 

Message edited by:
Vintar
07/02/2012 22:49:07
Messages: 6349
hmm now I`m no scripting genius, but maybe something like :
for i  = 0, 65535 do
     local obj = level.object_by_id(i)
     if obj and IsStalker(obj) and obj.clsid and obj:alive() then
          local zone = alife():object("restrictor_name")
          if zone and zone:inside (obj:position ()) then
               return true   --or do whatever
          end
     end
end


the trick is where to put this check, like I said Im no genius so maybe someone else has better ideas or its actually easier to check in sr_idle, whoknows
  11:36:47  3 July 2012
profilee-mailreply Message URLTo the Top
olaf1
Senior Resident
 

 
On forum: 01/17/2012
Messages: 240

---QUOTATION---
hmm now I`m no scripting genius, but maybe something like :
for i  = 0, 65535 do
     local obj = level.object_by_id(i)
     if obj and IsStalker(obj) and obj.clsid and obj:alive() then
          local zone = alife():object("restrictor_name")
          if zone and zone:inside (obj:position ()) then
               return true   --or do whatever
          end
     end
end


the trick is where to put this check, like I said Im no genius so maybe someone else has better ideas or its actually easier to check in sr_idle, whoknows
---END QUOTATION---



Thank you i think that is waht i need.
  22:22:33  3 July 2012
profilee-mailreply Message URLTo the Top
Alundaio
Sad Clown
(Resident)

 

 
On forum: 04/05/2010
 

Message edited by:
Alundaio
07/03/2012 22:48:00
Messages: 2230
Yikes. Only do that if you have no other choice. Check in motivator_binder:update or se_stalker:update (if you want it to happen offline too) and raise a flag if they are inside.
 
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-2021 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.