aliens

Author Topic: [Answered] changing item use cost  (Read 2120 times)

Offline icemasteryeti

  • Squaddie
  • *
  • Posts: 3
    • View Profile
[Answered] changing item use cost
« on: July 04, 2021, 03:45:24 pm »
I'm new to OXCE scripting and from what I've worked out this probably won't work but I thought I'd ask just to be sure.

My idea was to make a tag for an item to be fired for free while moving. Every time a soldier moves a tile while holding it a value attached to a tag is incremented by the move cost and when the weapon is fired either the value of the tag or the cost of a snapshot, whichever is lower, is subtracted from the cost to fire.

Is there some way to both get and modify the cost of a snapshot that I'm missing or is this not possible?
« Last Edit: February 12, 2023, 11:33:07 am by Meridian »

Offline Yankes

  • Commander
  • *****
  • Posts: 3240
    • View Profile
Re: changing item use cost
« Reply #1 on: July 05, 2021, 12:27:31 am »
For now scripts are not aware of unit moments (it possible to be added in some future), and can't affect cost of attacks (and this will be off limit as could cripple AI or other parts of code that need predict use cost).

Offline icemasteryeti

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: changing item use cost
« Reply #2 on: July 05, 2021, 12:56:08 am »
Yeah I thought so, oh well thanks.

Offline Finnik

  • Colonel
  • ****
  • Posts: 494
  • Finnik#0257
    • View Profile
Re: changing item use cost
« Reply #3 on: July 12, 2021, 09:53:43 am »
Could be a bit offtopic, sorry. @Yankes - what do you think about hook for firing weapon or making melee attack? Current hooks catch only general accuracy calculation and works perfect, but i can't detect firing event. Say, firing some BFG would cause fear of all units in 10 tiles, reducing morale by 20)

Offline Yankes

  • Commander
  • *****
  • Posts: 3240
    • View Profile
Re: changing item use cost
« Reply #4 on: July 13, 2021, 12:08:19 am »
Yes, I had some thing like that in plans but looking on my current work speed it would not be in this year

Offline Finnik

  • Colonel
  • ****
  • Posts: 494
  • Finnik#0257
    • View Profile
Re: changing item use cost
« Reply #5 on: July 14, 2021, 11:19:40 am »
Keep going in comfort speed, burnout is the worst