• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

need help with a basic trigger

Status
Not open for further replies.

_PV

_PV

Level 7
Joined
Aug 28, 2010
Messages
285
Hi, i need help with a trigger... An example i can give is in DotA Tiny's "Toss" ability. i want a unit to somehow fly through the air, like quickly increasing his height and then slowly decreasing his height to it's former stage, almost like a forward leap or something like that:eekani:.. please help
 
thanks, im going to go get the paladin's jump now.. defskull, i want the launched unit to fly backwards, should i use the same movement trigger as the one in the knockback trigger that makes the unit actually knock back whilst he is in the air?
 
ive been away from my computer for a week so here i am again. anyway, i nearly got it right, the unit is just leaping to the wrong direction lol i'm fixing it now. thanks guys.
oh, one more thing, i want my camera angle to shift as the unit changes direction, and i need a way to prevent a player from pushing the insert or delete key because they mess up the camera angle. i also cant get the camera angle to turn as the unit turns =[
 
reverse angle is easy..

JASS:
local real unit1 = caster
local real unit2 = target
local real x = GetUnitX(unit1)
local real y = GetUnitY(unit1)
local real x2 = GetUnitX(unit2)
local real y2 = GetUnitY(unit2)
local real dx = x - x2
local real dy = y - y2
local real angle = Atan2(dx * dx + dy * dy)
    call SetUnitX(unit2, x + distance * Cos (angle * bj_DEGTORAD)
    call SetUnitY(unit2, x + distance *Sin (angle * bj_DEGTORAD)

not sure about angle, did it without looking at polar projection..
 
  • Like
Reactions: _PV
Thanks guys, i seem to have got it right =] my only problem at the moment is that camera... when i say(e.g.): apply camera001 over 0.00 seconds
then: lock camera to unit001 over 0.00 seconds rotation based on units rotation.

then i cant find a way for the camera to turn based on the units rotation, i mean, i set it to " camera rotation based on unit's rotation" as stated in my examlp, but if the player presses the del or insert key, the camera resets and i don't want those keys to reset my camera angle.. the camera rotation also doesn't work..
 
Status
Not open for further replies.
Back
Top