• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

SkillReferenceTriggerHelp

Status
Not open for further replies.
Level 7
Joined
Oct 6, 2022
Messages
135
Hello again can i ask for help, how can i make this on trigger without jass?
I was planning to do it in a targetable skill but i can't, all i could do was the omnislash. I would appreciate your help guys thank you :cry:

(Source: Honkai impact 3rd | Yae Sakura tutorial(s) by Hollowed_Skies)
 
Level 7
Joined
Oct 6, 2022
Messages
135
was it okay if it only just the dash through enemy multiple times like from the vid only? Since Uncle already taught me about the knock up trigger.
 
Ok, so, you'll need (at least) 2 triggers. On "on cast" and one "periodic". The ability itself should not do anything. You do it all in triggers.
Depending if there are more than 1 unit that should be able to cast it at the same time or not, you'll need indexing of an array or just a single variable.

The basic idea is that, on cast, you add the unit to a unit group ("dashingUnits" or just a unit variable if only 1 unit can cast this), setup destination (target point of ability?, or just check nearby units and go in the direction of nearest unit but like 64 units or so further).
I guess that each unit hit should be damaged once, the first time hit, right?
If so, you'll need a "hitGroup" too that should be empty when starting.
Maybe you want to attach a special effect to casting unit for some flair. I'd recommend one of the slashes from @Vinz resources.

Then in periodic (initially off trigger, with 0.04 interval), if the "dashingUnits" group has more than 0 units, do trigger, else turn it off.
For each unit in "dashingUnits", move them towards their destination (maybe 20 units towards the destination-point), check nearby units and loop through them and if they are not in "hitGroup", deal damage and add them to it.
If you are within like 10 units or so from your destination, you the distance you moved were less than half of what you expected, remove the unit from the "dashingUnits" group, clean-up destination-point and other variables used that would leak otherwise.

Do you understand how it would work? Does something sounds hard?

If you have trouble doing the trigger, I should have time to do something later, or maybe a wild Uncle will appear, you never know ;)

Edit: of course, upon reaching the destination, maybe you want to dash back again, or is that a separate cast? You could have a counter and dash back and forth until you've dashed X amount of times or the target is dead or something. You might need to add some extra variables for that, but it's not a big deal.
 
Last edited:
Level 7
Joined
Oct 6, 2022
Messages
135
i understand it a bit, but i would like to see how in non jass trigger formed like how Uncle putted it like this.
Screenshot_20221012-091324.png

Edit: Looks like i really can't do it
 
Last edited:
Right, I tried to make it like this:
  • DashCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dash through unit
    • Actions
      • Set dashUnit = (Triggering unit)
      • Set dashTargetUnit = (Target unit of ability being cast)
      • Set temp_loc_caster = (Position of dashUnit)
      • Set temp_loc_target = (Position of dashTargetUnit)
      • Set temp_real_angle = (Angle from temp_loc_caster to temp_loc_target)
      • Set dashTargetPoint = (temp_loc_target offset by 40.00 towards temp_real_angle degrees)
      • Custom script: call RemoveLocation(udg_temp_loc_caster)
      • Custom script: call RemoveLocation(udg_temp_loc_target)
      • Trigger - Turn on DashLoop <gen>
  • DashLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set temp_loc_caster = (Position of dashUnit)
      • Set temp_real_angle = (Angle from temp_loc_caster to dashTargetPoint)
      • Set temp_loc_target = (temp_loc_caster offset by 18.00 towards temp_real_angle degrees)
      • Unit - Move dashUnit instantly to temp_loc_target, facing temp_real_angle degrees
      • Set temp_loc_caster_after = (Position of dashUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between temp_loc_caster and temp_loc_caster_after) Greater than 12.00
          • (Distance between temp_loc_caster_after and dashTargetPoint) Greater than 12.00
        • Then - Actions
          • -------- Successfully moved further than 12 units, and there are more than 12 units left to destination: --------
          • -------- Deal damage etc. here? --------
        • Else - Actions
          • -------- Moved less than 12 units or less than 12 remaining --------
          • Trigger - Turn off (This trigger)
      • Custom script: call RemoveLocation(udg_temp_loc_target)
      • Custom script: call RemoveLocation(udg_temp_loc_caster)
      • Custom script: call RemoveLocation(udg_temp_loc_caster_after)
It doesn't work due to how GUI "Move unit instantly" works (i.e. checks if the units fits, etc. witch it doesn't when going through a unit)
When testing I realized that there are many funny edge cases that could be considered, like "should you be able to dash through walls?", "should you dash to target point or unit?", etc.
I don't have good answers for everything and don't have any more time today, so here is my current version (attached in map):
Note: This is a test-map to try to make something work, not be a "copy-paste"-ready solution.
  • DashCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dash through unit
    • Actions
      • Set dashUnit = (Triggering unit)
      • Set dashTargetPoint = (Target point of ability being cast)
      • Animation - Play dashUnit's Walk Defend animation
      • Animation - Change dashUnit's animation speed to 110.00% of its original speed
      • Trigger - Turn on DashLoop <gen>
  • DashLoop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set temp_loc_caster = (Position of dashUnit)
      • Set temp_real_angle = (Angle from temp_loc_caster to dashTargetPoint)
      • Set temp_loc_target = (temp_loc_caster offset by 15.00 towards temp_real_angle degrees)
      • Custom script: call SetUnitX(udg_dashUnit, GetLocationX(udg_temp_loc_target))
      • Custom script: call SetUnitY(udg_dashUnit, GetLocationY(udg_temp_loc_target))
      • Set temp_loc_caster_after = (Position of dashUnit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between temp_loc_caster_after and dashTargetPoint) Greater than 14.00
        • Then - Actions
          • -------- More than X units left to destination: --------
          • -------- Deal damage etc. here? --------
        • Else - Actions
          • -------- Less than X units to destination. Finished now --------
          • -------- This will ensure valid point to stand --------
          • Unit - Move dashUnit instantly to dashTargetPoint, facing temp_real_angle degrees
          • Animation - Reset dashUnit's animation
          • Animation - Change dashUnit's animation speed to 100.00% of its original speed
          • Trigger - Turn off (This trigger)
      • Custom script: call RemoveLocation(udg_temp_loc_target)
      • Custom script: call RemoveLocation(udg_temp_loc_caster)
      • Custom script: call RemoveLocation(udg_temp_loc_caster_after)
I Use SetUnitX/Y in order to make unit move through units, but it will also make it possible to move through terrain.
Due to details, if you give more orders during dash, it will behave stranglely. Probably better to give unit windwalk or something to be able to pass through units and use the "Move unit instantly" from 1st attempt... Unsure...

Does this show you show it could be done?

Edit: Please paste your triggers so they are viewable next time using this method: How To Post Your Trigger
 

Attachments

  • dashText.w3x
    19.5 KB · Views: 150
Status
Not open for further replies.
Top