ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
CoP-Cs features in SoC

« Previous 10 events | 1 2 | All Messages
Posted by/on
Question/AnswerMake Oldest Up Sort by Ascending
  23:33:44  20 January 2013
profilee-mailreply Message URLTo the Top
Vintar
a bit of this and a lot of that
(Resident)

 

 
On forum: 08/08/2008
Messages: 6349
In Lua_help i see th function "get_bleeding()" for a game_object, so this may work, bt I`m just guessing. Also how to set it I dont know, maybe needs packets seeing as it is not a property.
  23:24:26  20 January 2013
profilee-mailreply Message URLTo the Top
Muad'Dib
Senior Resident
 

 
On forum: 01/24/2011
 

Message edited by:
Muad'Dib
01/20/2013 23:27:00
Messages: 421
CoP-Cs features in SoC

Hey Stalkers,

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
end

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)
then
return true
else
return false
end
end

function actor_is_damn_healthy(first_speaker, second_speaker)
return not actor_needs_bless(first_speaker, second_speaker)
end


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.
 
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.