ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
Xr_condition to check another npc faction not working

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  12:53:40  5 May 2012
profilee-mailreply Message URLTo the Top
Yeah, Good Luck With That...


On forum: 01/31/2009
Messages: 1070
Xr_condition to check another npc faction not working

Hi, guys.

I'm testing a new squad, and i have an issue. The idea is simple. The guy has to die IF he sees some member of a specific faction.

Let's imagine a lone stalker ignoring all dangers (controled by logic), this way...


active = kamp
combat_ignore = combat_ignore
meet = meet


center_point = agr_under_ban_fire
path_walk = agr_under_ban_pos
danger = agr_under_ban_camp_danger
combat_ignore_cond = always
meet = no_meet
on_info = {=npc_see_faction(bandit)} nil %=kill%

So the guy dies ONLY if the second npc is a bandit (in this case of course)




function npc_see_faction(actor, npc, p)
local community
if npc and p[1] then
community = npc:character_community()
if tostring(p[1]) == then
return true
return false


At this point i have a ctd:



[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\patch_1_0004\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...rnobyl v1.0004\gamedata\scripts\xr_conditions.script:1383: attempt to call field 'name' (a nil value)

stack trace:


I think for some of you guys this is easy. Maybe Lijestina, Vintar, Barin, Natvac, etc.

So any idea how to fix it?

Thanks in advance
  17:31:58  5 May 2012
profilee-mailreply Message URLTo the Top
Doom metal in the shade of the flying radiators


On forum: 07/23/2005
Messages: 1902
if tostring(p[1]) == community then

Try this. That should return the character community already.
Each word should be at least 3 characters long.
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-2022 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.