OpenXcom Forum

Modding => Help => Topic started by: Ranakastrasz on December 02, 2021, 12:26:31 am

Title: Script on Missed shots
Post by: Ranakastrasz on December 02, 2021, 12:26:31 am
Is there a way to do something when a shot hits the terrain, or while it flies? It looks like the answer is no, but I thought I should ask.
Title: Re: Script on Missed shots
Post by: Yankes on December 02, 2021, 07:55:18 pm
In some far far future it probably be some thing like this, but for now there is no option for it.

And more improbably for what you would like to use it?
Title: Re: Script on Missed shots
Post by: Ranakastrasz on December 02, 2021, 10:33:32 pm
As an option for making suppressive fire, detecting misses and applying morale and time damage. I thought I could detect ground hits and select in area to apply the effect, as one way to do it, even if imperfect.
Title: Re: Script on Missed shots
Post by: The Reaver of Darkness on December 03, 2021, 03:27:46 am
Perhaps you could detect tile changes, such as when a tile is destroyed? I don't know how to do it, but it might be possible.

You can get a lot more advanced options like this if you get into scripting. Finnik's 'From the Ashes' client enables a lot more in-depth scripting options. As for scripting in OXCE, Yankes is pretty much our leading expert as far as I am aware.
Title: Re: Script on Missed shots
Post by: Yankes on December 03, 2021, 11:14:15 am
Perhaps you could detect tile changes, such as when a tile is destroyed? I don't know how to do it, but it might be possible.

You can get a lot more advanced options like this if you get into scripting. Finnik's 'From the Ashes' client enables a lot more in-depth scripting options. As for scripting in OXCE, Yankes is pretty much our leading expert as far as I am aware.
Currently you can't check changes in tiles, even if I would expose all required data you still could not see as you can't have value to compare to detect change.

For Finnik fork, I do not know if it have more script (as y-script not other things named "scripts") options than OXCE.
Title: Re: Script on Missed shots
Post by: Finnik on February 14, 2022, 02:14:32 am
Currently you can't check changes in tiles, even if I would expose all required data you still could not see as you can't have value to compare to detect change.

For Finnik fork, I do not know if it have more script (as y-script not other things named "scripts") options than OXCE.

Sorry for necroposting.

I don't dare to add more hooks =) If I will make some (and I think if I will do it would be about geoscape) - I will for sure try to contact OXCE devs about consultation and their spiritual support, especially from Yankes.  And I think it would be good to have it merged to OXCE. I do, however, some differences compared to OXCE because they are related to my engine specific features, like loyalty. Still, those features are tiny.