Point, Offset, Maths, Urgh!

Grags_1977

Ultra Cool Member
Reaction score
32
I'm terrible at maths, and explaining things. But I will try my best...

I have 2 problems.


Problem 1

I'm trying to get the point that's between Point1 and Point2.

For instance...

set point1 = position of unit
set point2 = position of target unit
Create a special effect at point1 using BlinkCaster.mdl
Create a special effect in between point1 and point2 using BlinkCaster.mdl
Create a special effect at point2 using BlinkTarget.mdl



Problem 2

set point2 = Just In front of the target unit. So whichever ever way the target unit is facing point 2 is there. So when the casting unit is moved to point 2 the units are not stood on top of each other.


The ability in detail

The ability is called Rush. It's a bit like how Charge worked in WoW Pre-Tbc and is my answer to a hookshot in the Zelda games.

The ability warps the hero to any destructible, Item, Unit (even allied, invulnerable) in a 1600 radius. It's superb!

These are my triggers (If it helps)

Trigger:
  • Rush
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Rush
    • Actions
      • Wait 0.01 seconds
      • Set TempPoint[16] = (Position of Unit_Hero)
      • Special Effect - Create a special effect at TempPoint[16] using Abilities\Spells\Other\Drain\ManaDrainTarget.mdl
      • Custom script: call RemoveLocation( udg_TempPoint[16] )
      • Set SpecialEffect_SFX = (Last created special effect)
      • Animation - Change Unit_Hero's animation speed to 50.00% of its original speed
      • Custom script: call SetUnitAnimationByIndex(udg_Unit_Hero, 117)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target destructible of ability being cast) Not equal to No destructible
        • Then - Actions
          • Trigger - Run Rush Destructible <gen> (ignoring conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target item of ability being cast) Not equal to No item
        • Then - Actions
          • Trigger - Run Rush Item <gen> (ignoring conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target unit of ability being cast) Not equal to No unit
        • Then - Actions
          • Trigger - Run Rush Unit <gen> (ignoring conditions)
        • Else - Actions
      • Wait 0.41 seconds
      • Animation - Change Unit_Hero's animation speed to 100.00% of its original speed
      • Set TempPoint[16] = (Position of Unit_Hero)
      • Special Effect - Create a special effect at TempPoint[16] using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 0.40 seconds
      • Animation - Reset Unit_Hero's animation


Trigger:
  • Rush Unit
    • Events
    • Conditions
    • Actions
      • Set Unit_TempOther = (Target unit of ability being cast)
      • Wait 0.40 seconds
      • Special Effect - Destroy SpecialEffect_SFX
      • Set TempPoint[15] = (Position of Unit_TempOther)
      • Set TempPoint[16] = (Position of Unit_Hero)
      • Special Effect - Create a special effect at TempPoint[16] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_TempPoint[16] )
      • Unit - Move Unit_Hero instantly to TempPoint[15]
      • Set TempPoint[16] = (Position of Unit_Hero)
      • Special Effect - Create a special effect at TempPoint[16] using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_TempPoint[16] )
      • Custom script: call RemoveLocation( udg_TempPoint[15] )
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit_TempOther belongs to an enemy of Player 1 (Red)) Equal to True
        • Then - Actions
          • Unit - Cause Unit_Hero to damage Unit_TempOther, dealing ((Real((Agility of Unit_Hero (Include bonuses)))) x 3.00) damage of attack type Spells and damage type Normal
        • Else - Actions
          • Unit - Remove Stunned (Pause) buff from Unit_TempOther
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you could, create a unit at point 1 (dummy unit with a blank model and locust) facing point 2, and set point 3 equal to a point in front of the dummy unit half the distance between point 1 and point 2
 

Grags_1977

Ultra Cool Member
Reaction score
32
Sorry GFreak, but what you're explaining, seems to be a mix of both of the problems that i'm asking. Even with the dummy unit, i'm still left with the same questions...

Or am I reading you incorrectly?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
my post was a solution to question 1, idk what the question was for the 2nd issue
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
For Problem 1, you can set a point to be in the middle of two other points like this:
Trigger:
  • Set Point3 = (Point1 offset by ((Distance between Point1 and Point2) / 2.00) towards (Angle from Point1 to Point2) degrees)

For Problem 2, you haven't said what's going wrong with the trigger.
 

Grags_1977

Ultra Cool Member
Reaction score
32
Thankyou Ryushi, your trigger will most deffo be used +Rep

As for problem 2. There isn't really much wrong with the trigger, it's just a perfectionist issue. ATM when I cast Rush, the hero warps to the unit perfectly(ish). I want the hero to warp just in front of the unit so thier models arn't on top of each other. Preferably in front of the target units facing angle. So he's just in attacking distance.

The "problem" doesn't really count for any other object as i'm over paranoid with paving blockers.
 

merlinds

Member
Reaction score
15
For the problem 2. You need to know the "Caster" atacking range.
For the example lets set it as 120.
The point4 will be
Set point4 = (Position of TargetUnit offset by 120 facing "Facing angle of TargetUnit)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
to do this you would need create a trigger that fires every 0.2 seconds or so (timer) and move him closer every time it fires, and then destroy it when he is close enough to attack

or if its just instant move up to the unit type of ability, do just like what ryushi said but make it distance of the units - 90 instead of /2
 

Grags_1977

Ultra Cool Member
Reaction score
32
Then have a look :)


This version is 2 days old as in the most playable version. I made this version as a friend who is also mad into world editor wanted to test it. So I stuck a few creeps in and made it a somewhat near playable map.

I think in around 6 months time (maybe more, maybe less) I could have a beta version on the forum.

If you want a preview of the Abilities type in ALL and you will have all the abilities.


Yes it's called Dunno, cause I dunno what to call it yet :)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
ill definately try it out when i get home :)

EDIT: Ty for the rep :D, after i test it if i like the concepts ill def +rep you too... gotta have a reason >.<
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top