Page 1 of 1

question about some callins[SOLVED]

Posted: 03 Sep 2017, 16:03
by res
Hey, i tried to make some widget that makes watery sounds when units are moving in water or entering water. For this to work i first used a widget were enemy sounds were excluded. To also include these i used a gadget.(not sure if this is right way to go). This all worked fine since some of the callins were allready in the gadgetHandler (UnitEnteredWater, UnitLeftWater) but i am not sure if they should be there. (because on lua scripting documentation they are not). This all does what i want but i am not sure if i understand the scope of the problem since i do get some errors messages which hopefully not influence the game.

To be clear: the main question is is this the way to go to make such a gadget and second question should these callins be used as such?

gadget:
http://paste.springfiles.com/view/94d9bf7c

errors messages:
http://paste.springfiles.com/view/59d56a21

thanks,

greetz,
res

Re: question about some callins

Posted: 03 Sep 2017, 16:15
by gajop
Should work if you use a new gadgethandler and engine https://github.com/spring/spring/commit ... 3bcb77d19d

Re: question about some callins[SOLVED]

Posted: 03 Sep 2017, 16:43
by res
Thanks that seems to make all fine :D

Re: question about some callins[SOLVED]

Posted: 03 Sep 2017, 22:16
by res
i did some changes and the final seems to work fine! It might be too loud for some ppl tho but less bugs!

https://github.com/xta-springrts/xta-sp ... ds_xta.lua

Just put it here for someone who cares!