Does the current modding API give access to a unit move function/command?

Discussion in 'Mod Discussions' started by zihuatanejo, September 16, 2014.

  1. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Oh nooo, someone is using something I made for knowledge, that's never good.

    On a more serous note, that hasn't been updated in a while...
    zihuatanejo likes this.
  2. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    It works the same as everything else in the action bar (attack, patrol, etc) even if the button isn't there anymore.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So it could be used... though creating pings would be really ugly, as they also show up in replays and for other players.
    Meh... somebody come up with a hack to get the current position of the camera.
    thetrophysystem and cptconundrum like this.
  4. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    With create-unit and something like the puppetmaster drop-pod-launcher (zero health), you could use created events. But that's some annoying prereqs.
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Wasn't create unit only at the location of the mouse? So you can get the world coordinates of the mouse via cheats.
  6. zihuatanejo

    zihuatanejo Well-Known Member

    Messages:
    798
    Likes Received:
    577
    Cleverness. I guess now I need to wrap my head around modding PA so I can try and figure out your clever hack, @cola_colin!
  7. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Sorry to put you down, but that won't be part of the discussion at all. The only question is whether you are providing the options for everyone or just for players who are willing to dig a bit deeper. It's either providing the API on your own, or having it reverse engineered. It has been like that in EVERY game before, and the longer you wait, the higher the risk of reverse engineering happening.

    Which also means having hacks flying around which are peeking and poking at the memory with admin permissions rather than using the JS sandbox.

    Besides, if it possible to "cheat" by acting as a client it just means that you have exploitable mechanics. No less no more.
    Last edited: October 2, 2014
    cola_colin likes this.
  8. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Yes, though I misspoke; create-unit doesn't fire the create event, so you'd actually be looking for the destroyed event.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    You should be able to copy paste my example cost and that will give you the second of the functions you asked for.
    Now the next issue will be the question where to start your movement. The only idea I have for that is the ask the player to make a ping.

Share This Page