• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Flying Height Jumps

Status
Not open for further replies.

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Hey i don't usually ask for this but i got a problem making a dummy missile fly upwards then come down looking like a circle ( Parabolique ) i have the dummy fly and come down like a Triangeled shape so help me understand how the formula works ?
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
hmm,, Maths =D
-(x * x) makes a parabola from low to high, and to low again,
so it would be: 100 -1 * ( x * x)
100 is the highest of the bullet,,
i dont know how to make it go that way, but that is the formula

maybe:
---------------------
Event : Cast ability

Action: set x = -10

---------------

Event: every 0.1 sec of the game

set y = 100 + -1 * ( x * x )
if x is greater than or equal to 11
----- Do actions to stop the whole missile
move 'bullet' instantly to (point with polar offset ( position of bullet, 10 + x range, facing of bullet degrees)
change 'bullet' flying height to y height at 0
set x = x + 1
-------------------------------------------

I know this looks like quite a big mess,, but i hope it helped

EDIT: the range of the movement of the bullet has to be + 10 to make it not go BEHIND the shooter ( or whatever it is)
This number has to be the opposite of the starting number of x ( x = -10, then the range + 10,, x = -20 then the range + 20)
Please dont ask me to give you a new starting number for x if you change the maximum height, i dont know how to do that!
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Have patience,, im working on it,,
Ill post them as soon as they are ready
( 2 or 3 mins)

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Create 1 Footman for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
      • Set Bullet = (Last created unit)
      • Set BullitPosition = (Position of Bullet)
      • Set X = -10.00
      • Unit - Add Storm Crow Form to Bullet
      • Unit - Remove Storm Crow Form from Bullet
  • Move
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set Y = (100.00 + (-1.00 x (X x X)))
      • Unit - Move Bullet instantly to (BullitPosition offset by (11.00 + X) towards (Facing of Bullet) degrees)
      • Animation - Change Bullet flying height to Y at 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • X Greater than or equal to 11.00
        • Then - Actions
          • Set Bullet = No unit
        • Else - Actions
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
It works if you set 1 extra action (which you mentioned already)
the: set X =X + 1 after the ELSE

BUT!: this looks really crappy, use a higher max value, a lower PERIODIC time(more per sec) and then look how much you want the X to increase

(I THINK, but i dont know fur sure: that the starting value of X has to be the Square root of the max value ( square root of 100 = 10, that is why the starting value of X was -10)
 
Status
Not open for further replies.
Top