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. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  4. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  5. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  6. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  7. 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.

Auto Cast Help

Discussion in 'World Editor Help Zone' started by Doctor Hobo, Nov 5, 2016.

  1. Doctor Hobo

    Doctor Hobo

    Joined:
    Nov 3, 2016
    Messages:
    7
    Resources:
    0
    Resources:
    0
    I am trying to make a orc raider auto cast ensnare when NEAR any enemy flying unit. I was following this tutorial...

    Making any Spell Autocasting

    ,but i am still unable to make my orc raider auto cast. Any ideas you guys come up with do not have to follow the tutorial i linked. anything will help as long as it works. I Based my dummy spell off searing arrow. what i currently have is ...
    (PS.. i am still new to this so please explain as much as you can)

    Ensnare in object manager ...
    ensnare.png

    dummy spell(searing arrow) in object manager... dummy.png


    raider changes in object manager... raider.png


    trigger...
    trigger.png
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    IMO the method Ralle used has some questionable choices. For example it doesn't make sense to give your custom ensnare ability mana cost and cooldown and you don't have to add it to the raider because you can use a dummy caster unit to cast the actual ensnare instead. For all intents and purposes the dummy autocast ability SHOULD be the main ability with all cooldown/manacost/targeting options set to what you want the spell to actually have-- pretty much every custom spell does it this way.

    I probably wouldn't use Searing Arrows because it might interact weird with what you can actually target due to it being an attack modifier. Faerie Fire or Inner Fire are better choices IMO, though now that I think about it the fact that they would apply a buff briefly (giving them 0 duration makes them endless) might make them not a good choice. It is ultimately up to you, but know there might be downsides to which autocast ability you choose.

    I noticed you changed the Order String for Searing Arrows to "ensnare", and you should know that this does not do anything. The only spell that can have its order strings/base order changed is Channel (ANcl). You also can't just give a buff to an ability that doesn't use one naturally (as you added "Ensnare (Air)" to Searing Arrows)-- it won't show up. In general, a lot of fields that do nothing for any given base spell still appear in the OE, so don't assume that because the field is there it will actually do something.

    Finally, don't use "Begins channeling an ability". "Starts the Effect of an ability" is the proper event for detecting when a spell has been successfully cast. My trigger would look something like this:
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to DummyAutocastAbility
    • Actions
      • Set TempPoint = Position of (triggering unit)
      • -------- ^^ For leak removal later ^^ --------
      • Unit - Create one DUMMY_CASTER_UNIT for (owner of (triggering unit))) at (TempPoint) facing Default Building Facing degrees
      • Unit - Add a 1.00 second generic expiration timer to (last created unit)
      • Unit - Add Ensnare (your custom version) to (last created unit)
      • Unit - Set level of Ensnare (your custom version) for (last created unit) to (level of (ability being cast) for (triggering unit))
      • -------- ^^ if the ability was a hero ability and has multiple levels you would need to add the above line ^^ --------
      • Unit - order (last created unit) to (Orc Raider - Ensnare) (target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_TempPoint) //look up leaks and how to fix them to understand this
     
  3. Doctor Hobo

    Doctor Hobo

    Joined:
    Nov 3, 2016
    Messages:
    7
    Resources:
    0
    Resources:
    0

    It seemed to work. THANK YOU. however i am not sure if i am doing the custom script part right. all i did was ...
    cf78445996d9bb6847cbe9481ab6495b.png

    06463fd0b6124e40a2da90d6b66ce276.png

    b95aaf05eda217d37954f61934b9dfb0.png

    And if there is way to preform the auto cast without making a temp unit please let me know. I am asking because it kinda looks ugly for game play, But i can live if there is no other way. Again THANK YOU a bunch.
     
  4. ic3_water

    ic3_water

    Joined:
    Sep 7, 2008
    Messages:
    313
    Resources:
    2
    Maps:
    2
    Resources:
    2
    It's depended your dummy stat
     
  5. Doctor Hobo

    Doctor Hobo

    Joined:
    Nov 3, 2016
    Messages:
    7
    Resources:
    0
    Resources:
    0
    For those who see my post and want an answer to my question follow what has been said, but the trigger look different. I changed mine to look like this ... da25a3fc60b99d4d828e6e5d358a8429.png

    This trigger makes casting look only visually appealing. The raider will cast the dummy spell (which will do nothing) then will cast the snare (which snares the target). this means the raider will swing his sword twice before snaring the target and it will snare the same target multiple times. So even though it looks more visually appealing it is less effective. (you can remove the custom script, i forgot to remove it)
     
  6. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Don't make a copy of the unit casting the spell-- that will definitely look ugly! You just need to make one generic dummy caster unit in the OE and create one of those whenever you need to dummy cast a spell. Give it no model, 0 cast point and backswing, highest movespeed and mana, 0 sight radius (that might not be strictly necessary), and the ability "Locust" ('Aloc').

    Download pretty much any approved spell and you should see the creator's version of a dummy caster in the map-- you can just copy that over directly instead of making your own if you're lazy.


    Also you can right click a part of any trigger and select "copy as text" and then paste here between [trigger][/trigger] tags instead of uploading screenshots.
     
  7. Doctor Hobo

    Doctor Hobo

    Joined:
    Nov 3, 2016
    Messages:
    7
    Resources:
    0
    Resources:
    0
    OHHHHH!!!!!!!!!!!!!!!!! like i said i am still new at this. That is way better! thanks a bunch Pyrogasm
     
  8. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I think it should be no movespeed. A dummy caster with move speed will have issues casting spells in unit group loops.
     
  9. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Define "problems"?
     
  10. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    It won't truly be instant, so some units will be affected by the ordered spell and other units will not. I had that issue with Volatile Light.
     
  11. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Curious, but did you try using SetUnitPropWindow(u,0.00) to see if that un-did the problem? Seems like it would achieve the same thing as 0 MS. Obviously this is not a better solution but I don't see any other reason simply being able to move would cause a delay in cast as long as spells have max range.
     
  12. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I already had its Propulsion Window, Backswing, and Cast Point set to 0 in the Object Editor. I believe setting the unit's movement speed to 0 doesn't allow you to change its fly height, so this should done be used on dummy casters.

    I forgot to mention that the "issue" I talk about is really hard to see if you have it in a loop timer running every 0.03 seconds. If you go to the Volatile Light thread, you can see IcemanBo pointing out the issue to me.
     
  13. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,272
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    It doesn't instantly turn iirc, one could check it with placing dummy targets with same goal direction, and dummy targets with opposite goal direction.
    And then trying to execute cast order on both targets directly after each other, one time with movement speed, and one time with movement 0.