Can you tilt the axis?

Foresector

Member
Reaction score
16
This is kind of complicated to explain so yeah..

I was wondering if there was anyway to tilt the axis on any angle you want.
Being that the default Y axis in Warcraft goes vertically and X axis goes horizontally.
If anyone wonders what axis are used for, you use them for co ordinates to pick certain points on the map, like 40, 60 would be like 40 across and 60 up from the center.
 

waaaks!

Zinctified
Reaction score
256
i think u cannot tilt the axis in wc3, im pretty sure that the default view has the x and y axis default also
 

Foresector

Member
Reaction score
16
Oh, that's a pity..

In that case, does anyone have suggestions on maybe creating your own axis within a trigger so that you can pick out certain points?

I was thinking of one with 2 lines of dummy units but then I wouldn't know how to pick out points in relation to them
 
G

Gojhin

Guest
yeah i really don't think you're explaining your problem very well. try rephrasing it so we can understand your question.
 

Foresector

Member
Reaction score
16
:D, Quite simple really.

I'm trying to create a shockwavy ability except I don't want it to move in a straight line.

I'm using a basic calculus function (Y=Cosine X) to get the shockwave to move in sequential curves.

This basically means, that the horizontal movement is at regular pace, while the vertical movement starts from top, goes down then back up, repeating every 360 degrees.

This function requires co ordinates that are retrieved from the default axis used in WC3.

Unfortunately, this means that the spell will only ever go from left to right at a perfect 90 degree angle because of the fact that I can't tilt the default axis.

I was wondering if you could simulate a tiltable axis made up of maybe dummy units, and using some type of function to replicate X and Y points, that way you could send this curving shockwave at any angle.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
That's more of a problem description :p


Starting with the unit's activity, get the following:

Px = X of Casting unit,
Py = Y of Casting unit,
A = Angle from Position of Caster to Target point of ability

Enter some loop for your calculations:

X = going from <start> to <more> (yes, the "normal" left to right only),
Y = some function result involving X

And let it happen on the map with:
Xnew = Px + X * cos(A) + Y * sin(A)
Ynew = Py + Y * cos(A) - X * sin(A)

Which rotates the originally calculated point (X;Y) according to the casting direction A, with (Px,Py) as origin.


Good luck
 

Foresector

Member
Reaction score
16
Sorry once again :p

I tried using that formula and came up with this..

Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Spiral 
    Actions
        Set PX = (X of (Position of (Casting unit)))
        Set PY = (Y of (Position of (Casting unit)))
        Set Angle = (Angle from (Position of (Casting unit)) to (Target point of ability being cast))
        Unit - Create 1 Shockwave for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
        For each (Integer A) from 1 to 360, do (Actions)
            Loop - Actions
                Set X = ((X of (Position of (Last created unit))) + 1.00)
                Set Y = (1.00 x (Cos(X)))
                Set NewX = ((PX + X) x (((Cos(Angle)) + Y) x (Sin(Angle))))
                Set NewY = ((PY + Y) x (((Cos(Angle)) - X) x (Sin(Angle))))
                Unit - Move (Last created unit) instantly to ((Position of (Casting unit)) offset by (NewX, NewY))
                Wait 0.01 seconds

But for some reason the shockwave just keeps moving in the corners of an imaginary triangle.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Well, the (s and )s are slightly off...

> Px + X * cos(A) + Y * sin(A)

The 3 blocks added together here are
"Px", "X * cos(A)" and "Y * sin(A)"
 

Foresector

Member
Reaction score
16
Um sorry to be such a hassle :p

I've been working at this for quite a while now and it still doesn't seem to work.

Is this how it should work?

Code:
Melee Initialization
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Spiral 
    Actions
        Set PX = (X of (Position of (Casting unit)))
        Set PY = (Y of (Position of (Casting unit)))
        Set Angle = (Angle from (Position of (Casting unit)) to (Target point of ability being cast))
        Unit - Create 1 Shockwave for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Triggering unit)) degrees
        Set Shockwave = (Last created unit)
        Trigger - Turn on Axis Tilt <gen>
        Wait 3.00 seconds
        Trigger - Turn off Axis Tilt <gen>


Code:
Axis Tilt
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set X = ((X of (Position of Shockwave)) + 5.00)
        Set Y = ((100.00 x (Cos((X of (Position of Shockwave))))) + PY)
        Set NewX = (PX + ((X x (Cos(Angle))) + (Y x (Sin(Angle)))))
        Set NewY = (PY + ((Y x (Cos(Angle))) - (X x (Sin(Angle)))))
        Unit - Move Shockwave instantly to (Point(NewX, NewY))
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set Y = ((100.00 x (Cos((X of (Position of Shockwave))))) + PY)

What is that supposed to do?

It also doesn't look like anything mentioned as "basic calculus function" in post #6, or used in #8.
 

Foresector

Member
Reaction score
16
Oh thanks for the help again Acehart :D I would be so lost without you :D

Set Y = ((100.00 x (Cos((X of (Position of Shockwave))))) + PY)

The basic calculus function is Cos X
The times 100 is because 5 across on the x axis is like hardly a millimeter on the screen so I use bigger numbers.
The PY is to compensate for where the shockwave starts on the Y axis, otherwise the shockwave would instantly be brought to the middle
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top