1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Shoot & Move

Discussion in 'StarCraft II Modding' started by BlueBerryWizard, Mar 4, 2012.

  1. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I have an ability which auto-casts and works properly except for one thing: I want to make it so it can be casted while moving, at any unit 135 degrees in front of the moving unit, making the upper-body of the marine face the direction he's shooting.

    Like a Diamondback except the upper-half of the marine is the "turret" and the turret can't shoot 360 degrees around itself.

    Right now I have the animation play and at a given duration & timescale and I intend to do the muzzle flash and sound through script btw though I don't think that'll be a problem with what I want to do here.
     
  2. Rispetto

    Rispetto

    Joined:
    Jul 1, 2009
    Messages:
    1,080
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    From the sounds of things you simply need to give the marine a turret weapon.

    I believe most of all units and buildings in SC2 have a turret animation built into them.

    For example I have a feeling if you give a marine the terran missile turret weapon its upper body will spin in circles.

    You could apply this to creating a new weapon.
     
  3. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    This is an ability though Rispetto. The ability auto-casts but it's not a weapon.
     
  4. Rispetto

    Rispetto

    Joined:
    Jul 1, 2009
    Messages:
    1,080
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    There should be a value somewhere you can edit which allows the ability to be cast while in motion.

    Kind of like how a void ray can move, but is slowed, while attacking.

    I realize the void ray thing is a weapon but I can't really see how there is much of a difference; I imagine it has the same value.

    The other option is that the ability becomes an instant cast and all effects are done through triggers instead of relying on the unit to actually process it.

    The only downside that I can forsee is if the unit is killed mid-ability the ability will still fire.
     
  5. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    When set to transient, the marine can attack while running. There are three problems here though:
    1. The marine only attacks while running when the command to move was given via script, right-clicking or having your guy move with hotkey M doesn't work, he just doesn't auto-cast. So essentially only the AI will attack while moving.
    2. The marine can shoot 360 degrees around him... it is not limited to just what is in front and to the sides of him.
    3. The marine does not change the direction he faces when he casts the ability and the ability is transient.​

    I tried to use this to make him turn his upper-body but it has no discernable effect what-so-ever.
    Code (vJASS):
    ActorLookAtStart(lv_actor, "Chest", 100, 0.25, libNtve_gf_LookAtTargetFromPointWithZOffset(lv_ptB, 0.5));
     
  6. Rispetto

    Rispetto

    Joined:
    Jul 1, 2009
    Messages:
    1,080
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    Sounds to me like the Marine doesn't have the animation supported to turn his upper body.

    As for not being able to use M I've had similar issues.

    I doubt there's a fix.
     
  7. BlueBerryWizard

    BlueBerryWizard

    Joined:
    Aug 13, 2007
    Messages:
    309
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I don't think forcing an actor to turn towards a point is an animation... I may require a custom model though and I don't know how to model nor where to acquire models.
     
  8. Rispetto

    Rispetto

    Joined:
    Jul 1, 2009
    Messages:
    1,080
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    3DSMax