OpenXcom Forum

Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Nord on August 09, 2021, 07:55:58 am

Title: [DONE] Scripts and burning man question.
Post by: Nord on August 09, 2021, 07:55:58 am
Is there any hooks, variables, commands, etc in scripts, to acquire status of unit: on fire or not?
Thanks.
Title: Re: Scripts and burning man question.
Post by: Meridian on August 09, 2021, 10:33:46 am
not atm
Title: Re: Scripts and burning man question.
Post by: Nord on August 09, 2021, 10:57:12 am
sad but ok.
Title: Re: Scripts and burning man question.
Post by: Meridian on August 09, 2021, 11:04:03 am
It can be easily added.

We don't add everything by default, because the number of available attributes is just overwhelming... and because attributes that can be changed first need to be carefully checked for "how much damage could be done by exposing it" before it's added.

If you just need a read-only access to it, I'm sure Yankes (or I) can add such simple fields when you ask for them.
Title: Re: Scripts and burning man question.
Post by: Nord on August 09, 2021, 11:10:28 am
I just wanted to remove frozen effect (of my frost weapons) when unit goes on fire. Now i have only reversal, remove fire with frost weapons. But it is one half of logic.
Title: Re: Scripts and burning man question.
Post by: Meridian on September 17, 2021, 05:49:22 pm
This was added in the meantime.
Title: Re: Scripts and burning man question.
Post by: Yankes on September 17, 2021, 07:07:23 pm
This was added in the meantime.
In version OXCE 7.0.15 there two new operation for battle unit like:
```
u.getFire fire;
u.setFire 15;
```
Only probably problem is moment when unit catch fire, it could be applied by environment or by other scripts.
Because of this I think it should be handed by next turn scrip hook, where you will handle all units that have frost and fire at once
(stronger should win, and stay on unit, if have same strength then both could nullify each other).
Title: Re: Scripts and burning man question.
Post by: Nord on September 20, 2021, 01:20:10 pm
In version OXCE 7.0.15 there two new operation for battle unit like:
```
u.getFire fire;
u.setFire 15;
```
Only probably problem is moment when unit catch fire, it could be applied by environment or by other scripts.
Because of this I think it should be handed by next turn scrip hook, where you will handle all units that have frost and fire at once
(stronger should win, and stay on unit, if have same strength then both could nullify each other).
This is great! Thank you.