Make stkm chase fighter

  • JDY
    18th Mar 2016 Member 0 Permalink

    Is it possible in Lua to make stuck men chase fighters and stop fighters from chasing stick men?

  • LBPHacker
    18th Mar 2016 Developer 0 Permalink

    Well, I tried. It seems you can't even move fighters and stickmen the way you move ordinary particles because their .x and .y properties only seem to have an influence on the position of their legs and not on their heads.

  • jacob1
    19th Mar 2016 Developer 0 Permalink
    Yeah, you can't interact with stickmen via lua. In my mod I tried to solve this by adding this function: https://github.com/jacob1/The-Powder-Toy/blob/c%2B%2B/src/luascriptinterface.cpp#L1467

    The syntax looks very strange, I think it is something like sim.stickmen(, , , ). If you can figure it out, you could probably do this in my mod. Although i'm actually not sure if it is possible to disable FIGH from moving towards stickman at all. Doesn't look like it, unless maybe you can dig into the code a little more. I suggest looking at the FIGH code, it is pretty simple.