Issue with removing radiation from Player

Arszi
Scavenger
Posts: 16
Joined: 04 Jan 2018, 06:45

Issue with removing radiation from Player

Postby Arszi » 07 Jan 2018, 06:30

I am experimenting with a script, which resurrect and heals the player after death.

My only porblem is, if I die while I am radiated, some percentage of the radiation contamination won't be removed.
I tried this code so far:

Code: Select all

   db.actor:set_health_ex(1)
   db.actor.radiation = 0
   db.actor.bleeding = 1


db.actor.radiation = 0 does not remove radiation entirely. I found an oasis_heal function, which uses db.actor.radiation = -0.05, but it breaks the script.

My idea for workaround, that I spawn radiation medicine into the player's inventory, use it, then remove it from the inventory, but I'd like to avoid this solution if possible.

Is there any way to get rid of radiation contamination entirely?

luppolo
Scavenger
Posts: 35
Joined: 04 Nov 2016, 21:58

Re: Issue with removing radiation from Player

Postby luppolo » 07 Jan 2018, 22:26

the radiation value is not the actual value but a delta, so setting it at zero means "at the next game update the player radiation will be current + 0", to heal radiation that value must be negative

Arszi
Scavenger
Posts: 16
Joined: 04 Jan 2018, 06:45

Re: Issue with removing radiation from Player

Postby Arszi » 10 Jan 2018, 16:39

Thank you for your answer!
I tried to use db.actor.radiation -1, but it did not do anything. I got this one from the

-- Medic support

Code: Select all

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, which the medics use. Then tried db.actor.radiation -100, but it did not yield any results either.

Any idea please, what am I not doing right?


Return to “General Discussion”

Who is online

Users browsing this forum: gund0g and 1 guest