On forum: 01/24/2011
Message edited by:
CoP-Cs features in SoC|
I would like to transfer some features from CoP and CS to SoC.
The first one is the medic npc dialogs. I taked dialog and script from CoP.
When the actor.health is <1, the dialog is running perfectly, the health is restoring.
But if i speak with health =1, i obtain this CTD:
[error]Expression : fatal error
[error]Function : CScriptEngine::lua_error
[error]File : E:\stalker\sources\trunk\xr_3da\xrGame\script_engine.cpp
[error]Line : 73
[error]Description : <no expression>
[error]Arguments : LUA error: ...shadow of chernobyl3\gamedata\scripts\dialogs.script:279: attempt to compare number with nil
The script is:
function medic_magic_potion(first_speaker, second_speaker)
db.actor.health = 1
db.actor.power = 1
db.actor.radiation = -1
db.actor.bleeding = 1
function actor_needs_bless(first_speaker, second_speaker)
if db.actor.health < 1 or
db.actor.radiation > 0 or
db.actor.bleeding > 0 (this is the line 279)
function actor_is_damn_healthy(first_speaker, second_speaker)
return not actor_needs_bless(first_speaker, second_speaker)
I know actor.health, actor.radiation and actor.power in SoC, but i don't know if actor.bleeding is the good writing.
Maybe someone know more thing about it.
Grand Master in the Cult of Kanyhalos