• 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.

Multi Push away

Status
Not open for further replies.
Level 35
Joined
Oct 9, 2006
Messages
6,394
Hmm I used GUI to make it with, sound like it is proably therefor it didnt work. (I only use jass to clear up, to avoid leaks, so no idea of making pushback. My trigger was something like:
  • Events
  • Unit cast an Ability
  • Conditions
  • Ability Being Cast equal to Push
  • Actions
  • Set Target (target of ability being cast)
  • Set Caster (casting unit)
  • Set tempPoint1 (Position of casting unit)
  • Set tempPoint2 (Position of (target of ability being cast)
  • Turn on Push away
  • Wait 0.50 seconds
  • Turn off Push away
And the Push was something like:
  • Events
  • Every 0.02 seconds of game
  • Conditions
  • (Integer((Life of Target))) Not equal to 0
  • Actions
  • Unit-Move (Target) instantly to (TempPoint2 offset by 10.00 towards (Angle from tempPoint1 to tempPoint2) degrees)
 
Level 2
Joined
May 31, 2007
Messages
20
Well, it's much faster to use instead of the Angle from x to y (which will be constant), a real variable.
First trigger should look like (sry, don't have WE atm):
Well it isn't MUI, but most parts are still in GUI.
  • Set Target (target of ability being cast)
  • Set Caster (casting unit)
  • Set tempPoint1 (Position of casting unit)
  • Set tempPoint2 (Position of (target of ability being cast)
  • Set knockbackangle = Angle from tempPoint1 to tempPoint2
  • Custom script: call RemoveLocation(udg_tempPoint1)
  • Trigger - Turn on Push away
  • Wait 0.50 seconds
  • Trigger - Turn off Push away
  • Custom script: call RemoveLocation(udg_tempPoint2)
and change the 2nd to
  • Set tempPoint3 = tempPoint2 offset by 10.00 towards knockbackangle degrees
  • Custom script: call MoveLocation(udg_tempPoint2,GetLocationX(udg_tempPoint3),GetLocationY(udg_tempPoint3))
  • Unit - Move (Target) instantly to TempPoint3
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
Its fine, as said I also use the small bits of cstom codes myself, but cant make complete jass trigers, such as this. But you trigger looks good. I try it it out. If it works you have my thanks..

Edit: Didnt work...errors shows up when trying to save.
EditEdit: Dov... wrote temppoint in the last one, and I am using differnt names. Damn

EditEditEdit: STill not working.. what am I missing:
 
Level 2
Joined
May 31, 2007
Messages
20
The only thing i see is that you forgot to set PushTargetPosition = Position of Target.
Give me some time to look if i made any mistake.
---Edit---
Nope, works nice for me, here are my triggers (i just use array for the locations cause i'm lazy ^^).
  • CastPush
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Gleich Stormbolt
    • Actions
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Set tmp_points[0] = (Position of Caster)
      • Set tmp_points[1] = (Position of Target)
      • Set tmp_angle = (Angle from tmp_points[0] to tmp_points[1])
      • Wait 0.50 seconds
      • Set Target = no Unit
      • Custom script: call RemoveLocation(udg_tmp_points[0])
      • Custom script: call RemoveLocation(udg_tmp_points[1])
  • Pushback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
      • Target Ungleich no Unit
    • Actions
      • Set tmp_points[2] = (tmp_points[1] offset by 10.00 towards tmp_angle degrees)
      • Unit - Move Target instantly to tmp_points[2]
      • Custom script: call MoveLocation(udg_tmp_points[1],GetLocationX(udg_tmp_points[2]),GetLocationY(udg_tmp_points[2]))
      • Custom script: call RemoveLocation(udg_tmp_points[2])
 
Last edited:
Level 2
Joined
May 31, 2007
Messages
20
  • Unit - A unit starts the effect of an ability
is only the event when it should fire.
As you might know or not (i can impossible know it) the A Unit begins casting an ability actually fires before the mana is consumed and the cooldown started, so you can abuse it to cast the actual spell without spending mana, it would be like the -wtf mode in DotA.
Also i set Target = Target Unit of Ability being casted.
 
Level 2
Joined
May 31, 2007
Messages
20
let's say we devide the distance between both unit with 180, then you can use these formula for the fly height (just add and remove the crowform ability for setting the fly height)
f(x)=Sin(x)*y
f(x) is the fly height
x is the current period
and y is the maximal fly height
Give me some time to write it in GUI, cause i normally don't use GUI xD
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
let's say we devide the distance between both unit with 180, then you can use these formula for the fly height (just add and remove the crowform ability for setting the fly height)
f(x)=Sin(x)*y
f(x) is the fly height
x is the current period
and y is the maximal fly height
Give me some time to write it in GUI, cause i normally don't use GUI xD

Fine.. right now i am trying to figure out how to rotate the damn sheep, somehow managed tu make it spin like a top... but got an idea now. Sounds good..
Hmm two troubles:
One is, that the push can go trough trees.
The other is I am trying to make the caster rotate around himself, also first facing the target, then fast rotate around himself facing the target agian,´in which moment a dummy unit is trown at target pushing him back on hit. Then the sheep rotates same way again, throwing the second sheep (the sheeps are attached to left and right hand) at target. The seconds sheep explodes on contact dealing dmg.
 
Last edited:
Status
Not open for further replies.
Top