Page 1 of 1

[unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 17 Mar 2016, 08:57
by Forboding Angel
Common Includes: http://pastebin.com/Jrc3casS
Unitscript: http://pastebin.com/r4pJ8Rp8

I cannot get the doYouEvenLift() function to do anything. It would seem that it is more or less the same as thrust(), but while thrust works, doYouEvenLift() doesn't do anything.

Re: [unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 17 Mar 2016, 17:32
by 8611z
doYouEvenLift() function is not called anywhere

Re: [unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 17 Mar 2016, 19:15
by PicassoCT
Knorke is right. Its not called anywhere. How can you do this to us forb? You made us read code...

;)

Also, memefied APIs for the work, nothing is easier to learn

Try this, kids at home:
common = include("headers/common_includes_lus.lua", Spring.UnitScript ,VFS.RAW)
or
common = include("headers/common_includes_lus.lua", nil ,VFS.RAW)

also use assert on function in common object

assert(common.doyouEvenLift)
assert(type(common.doyouEvenLift) == "function")

Re: [unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 17 Mar 2016, 22:03
by Forboding Angel
Christ, Knorke, you're absolutely right. For some reason I had it in my head that declaring it would also be calling it. Thanks.

Re: [unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 18 Mar 2016, 17:35
by PicassoCT
That was uncalled for behavior there forb.

Re: [unitscript] Help me understand why doYouEvenLift() doesn't work

Posted: 18 Mar 2016, 21:35
by Forboding Angel
Wtf are you talking about? I was thanking him...