ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Shadow of Chernobyl Forum » Mod discussion
[REQ]Eat a Brain to Cure Psy Illness

« Previous 10 events | 1 2 | All Messages
Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  16:25:37  3 August 2013
profilee-mailreply Message URLTo the Top
SacriPan
Senior Resident
 

 
On forum: 09/20/2009
 

Message edited by:
SacriPan
08/03/2013 16:26:46
Messages: 319
Okay,

Based on Setakat's last post, I modified the function and simplified it (a lot).

In bind_stalker.script:


--code


------------------------------------------------
function actor_binder:net_destroy()

...

self.object:set_callback(callback.use_object, nil)

end



------------------------------------------------
function actor_binder:reinit()

...

self.object:set_callback(callback.use_object, self.on_use_item, self)

end



------------------------------------------------
function actor_binder: on_use_item(obj)

if (obj:section() == "mutant_controller_brain" ) then
db.actor.psy_health = 1
end

end


--code





THX Setakat.
  07:28:36  4 August 2013
profilee-mailreply Message URLTo the Top
Storm Shadow
A machine, a Shadow Machine.
(Resident)

 

 
On forum: 11/14/2007
Messages: 1430
AWESOME! thank you SacriPan & SetaKat,

your code combined works awesome.
 
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.