Arrow key movement issues (see inside)

Discussion in 'Starcraft 2 (SC2) Editor Help' started by THUNDERPOWER, Jun 27, 2010.

  1. THUNDERPOWER

    THUNDERPOWER New Member

    Ratings:
    +1 / 0 / -0
    I've recently begun work on an arrow key movement system, that works like this: when player presses Up, the unit will move forward; when a player presses Left, the unit will begin rotating on itself towards left.

    The Problem
    For whatever reason, when a player presses Left, the unit will begin pivoting which is all fine and dandy, but it will begin rotating by itself after a few seconds, which screws up the whole attack system. What's more is that the game will think the unit is still facing the way it was when it stopped rotating, causing big problems.

    I've attached the map below. You may notice some of the triggers are disabled and the attack system does not work. This is for testing purposes. The triggers can be found under Controls > Movement.

    http://www.mediafire.com/?x0myz12mndh
    (Wouldn't let me attach)
     
  2. Builder Bob

    Builder Bob Live free or don't

    Ratings:
    +249 / 0 / -0
    From my own attempts on controling turning as well as unit position independent of each other, the method I had success with was by never giving the unit any orders. Control facing and position by triggers. Use blend when setting position, and some low number like 0.1 when controling turning.
     
  3. THUNDERPOWER

    THUNDERPOWER New Member

    Ratings:
    +1 / 0 / -0
    I'm not sure what you mean. Could you please give me an example? :)
     
  4. Builder Bob

    Builder Bob Live free or don't

    Ratings:
    +249 / 0 / -0
    I couldn't figure out how you want the movement to work out, but here is my example anyway
     

    Attached Files:

  5. THUNDERPOWER

    THUNDERPOWER New Member

    Ratings:
    +1 / 0 / -0
    Your map has the same problem mine has.

    Open your map, and try pressing the right arrow key for a few seconds, then let go off it and wait about 10 seconds while keeping your eyes on the Phoenix and see what happens: it will rotate by itself.
     
  6. Arkless

    Arkless New Member

    Ratings:
    +31 / 0 / -0
    There was already a topic about this, sry, I don't quite remember everything... but it has something todo with the idle animation of the phoenix (I think).
     
  7. Renendaru

    Renendaru (Evol)ution is nothing without love.

    Ratings:
    +309 / 0 / -0
    I tried reproducing his issue and failed to do so, I saw nothing happen.
     
  8. THUNDERPOWER

    THUNDERPOWER New Member

    Ratings:
    +1 / 0 / -0
    Alright, try this:
    1) Open my map.
    2) Test it.
    3) Select the Phoenix.
    4) Press Left for 7-10 seconds (make sure it's actual seconds).
    5) Wait about 3 seconds.
    6) Press Left till the Phoenix starts rotating, then once it does, keep holding Left for about 2 seconds and let go.
    7) Keep your eyes on the Phoenix for about 60 seconds (again, REAL seconds).

    This should be a sure-fire way to reproduce the problem.
     
  9. Renendaru

    Renendaru (Evol)ution is nothing without love.

    Ratings:
    +309 / 0 / -0
    That's almost exactly what I did, nothing happened...
     
  10. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    Do you mean that you can rotate without moving forward?
     
  11. Builder Bob

    Builder Bob Live free or don't

    Ratings:
    +249 / 0 / -0
    I'm at a loss. I can't reproduce what you're describing.
     
  12. Dan

    Dan The New Helper.Net gives me great Anxiety... o.O;;

    Ratings:
    +160 / 1 / -0
    Is your unit supposed to stop obeying the arrow keys randomly and go whichever direction it feels like going? That, and either your right arrow key isn't detecting keypresses or my keyboard is shot. I think your problems are rooted a bit deeper than everyone previously thought. Let's start over.
     
  13. Arkless

    Arkless New Member

    Ratings:
    +31 / 0 / -0
    place like 20 of em on a map, make em move to target point and wait... after a few seconds (with bad luck maybe 1 minute or two :p) you will see they dont face the right direction anymore... thats some kind of idle animation for em
     
  14. Builder Bob

    Builder Bob Live free or don't

    Ratings:
    +249 / 0 / -0
    Ok, if that is the case, then the problem does not lie anywhere in the example code I posted at least. It lies in the unit itself.

    An easy fix would be to just create a new unit from the grounds up without basing it on any existing units at all. We all know starcraft units turn a bit here and there to make them look less static. Exactly where in the data editor that is specified I don't know from the top of my head, but I'm pretty sure it won't be default for a fresh unit.

    Edit: I managed to reproduce what the OP is describing with the Phoenix. Which units have you seen it happen with?
     
  15. Strilanc

    Strilanc Veteran Scripter

    Ratings:
    +42 / 0 / -0
    This should still happen even in a normal map. It's just the unit fidgeting. You've probably noticed it before, eg. when tanks rotate their turrets when idle.

    There's a player flag to turn off the fidgeting flag for all units per player (using a trigger) and you can probably do it in the data editor somehow.
     
  16. Builder Bob

    Builder Bob Live free or don't

    Ratings:
    +249 / 0 / -0
    Yes, it is. You can find a turret data entry called Phoenix (unnamed). This is what's causing problems for you. I'm going to advice you to create a unit from scratch, but if you still want to use the original Phoenix unit, you can modify this data entry as follows:

    Edit the field called 'Fidget +'

    Set 'Turn Angle' to 0

    There. Your phoenix won't turn on it's own anymore.
     
    • Like Like x 1
  17. THUNDERPOWER

    THUNDERPOWER New Member

    Ratings:
    +1 / 0 / -0
    Thank you so much! Have my measly reps lol.
    Also, if anyone else is having the same issue, deleting all the 'Fidget" animations works too.
     

Share This Page