• 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] Skill "Throw Ball"

Status
Not open for further replies.
Level 3
Joined
Dec 22, 2007
Messages
28
Heya

I got another problem.

If a unit comes near to the ball (unit), the ball hides and the unit gets the skill "Throw Ball" and an attachment to its right hand (the ball).

Till this point, it works. But:
I'd like to have a Skill, which throws the ball to a targeted point (on the ground). It should look like a pass/shoot to that point (with the Ball as projectile)

Oh, and you should be able to select the point, where the ball should be throwed.


Trigger 1.jpg


I know, it doesn't sound easy, if you need more information, just ask :)

Thx!


Ps: Paint ftw!
 
Level 9
Joined
May 27, 2006
Messages
498
The snowball would only fall down then, without the arc movement he wants to achieve. Unless you make some trigger that inverts the units health amount above certain amount, which would be easy to do.

Anyway jass is a better solution for arc-like movements etc.
 
Level 24
Joined
Oct 18, 2008
Messages
942
The snowball would only fall down then, without the arc movement he wants to achieve. Unless you make some trigger that inverts the units health amount above certain amount, which would be easy to do.

Anyway jass is a better solution for arc-like movements etc.

its really easy to make it arc. i guess it wont look as good as jass tho.

max hp is 100

if more than 50 hp make him go his hp -50 up. if its less than 50 make him go 50 - [his hp] down.
 
Level 3
Joined
Dec 22, 2007
Messages
28
Thx for the fast replys, but how do you mean it? (Unit, Dummys, Triggers etc.)

Oh btw. it's a football and not a snowball^^


The snowball would only fall down then, without the arc movement he wants to achieve. Unless you make some trigger that inverts the units health amount above certain amount, which would be easy to do.

Anyway jass is a better solution for arc-like movements etc.

its really easy to make it arc. i guess it wont look as good as jass tho.

max hp is 100

if more than 50 hp make him go his hp -50 up. if its less than 50 make him go 50 - [his hp] down.
 
Level 3
Joined
Dec 22, 2007
Messages
28
Omg^^ Stop fighting and tell me, how a trigger like that looks.

I know what you mean, but how can I set it, that it has the highest position in the middle of the way to the targeted point?
 
Level 24
Joined
Oct 18, 2008
Messages
942
im feeling really lazy <_<

u know how to make dummy projectiles? every 0.04 secs move it etc

create 2 other triggers that have condition his hp

the one thats more than 50 set his height to his current hieght plus (his hp minus 50)

the other one would be set his height current height minus (50 minus his hp)

make the move trigger run them both checking conditions. u need to set tempunit = picked unit so u can refer to it on them.
 
Level 3
Joined
Dec 22, 2007
Messages
28
& how i have to set the dummy unit's regen? Else it will go up always (hp -50) and down (hp + 50) and stay on the same height..

Oh btw gz for your (comming) 100th post^^

(btw check out my new avatar xD)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The first part is what will happen when you do it your way.

blabla.jpg


If that's what you want, you can simply increase and decrease the unit's height over time, based on the distance, no need for all this unnecessary calculations.

If you want a real parabola like the second part, you'll need to use smarter calculations -.-
 
Level 24
Joined
Oct 18, 2008
Messages
942
The first part is what will happen when you do it your way.

blabla.jpg


If that's what you want, you can simply increase and decrease the unit's height over time, based on the distance, no need for all this unnecessary calculations.

If you want a real parabola like the second part, you'll need to use smarter calculations -.-

pwnt
 

Attachments

  • c wut i did thar.w3x
    9.3 KB · Views: 42
Level 6
Joined
Mar 15, 2005
Messages
112
I did something just like this for a basketball game I'm making. I used storm bolt spell changed the model file to my basketball's model and changed the arc to 1.0. One problem is the ball was bigger then it should have been. Try other spells and change their model they use to your ball's. Much easier then trying to simulate an arc with JASS/triggers. Unit casts "throw" remove the attachment wait x seconds and move the actual ball the the position of the ability being cast/unhide ball.
 
Level 24
Joined
Oct 18, 2008
Messages
942
Pwnt? First off, you see it jumping from place to place (I.E: teleporting).

thats the same with slide unit triggers. why dont u go cry about them?

And of course, you can't control it's states.
How exactly do you throw to other distances? Ops... you can't.
How can you change arcs? Ops... you can't.

u can. edit its hp and trigger values.

If you ever want to add things like mass or stuff like that... you can't.

u were claiming
blabla.jpg


now i should have physics? lol


@ThaSHeep

do u need it MUI? im making it so u can target it to a point.
 
Last edited:
Level 3
Joined
Dec 22, 2007
Messages
28
You're
Just
Uber

Ty! Excatly that what I asked :) Great work!
+ rep

2 other things:
- The H in my name was a mistake, so call me ThaSheep
- The Unit casting this skill should be able to run while it uses the skill (like when you use Windwalk/I tried it with windwalk but it still haves the buffs (yes I ofc removed them in the copied skill))

But great work anyway :)
 
Level 11
Joined
Apr 6, 2008
Messages
760
two words: Jump Parabola

JASS:
function JumpParabola takes real dist, real maxdist, real curve returns real
    local real t = (dist * 2) / maxdist - 1
    return (- t * t + 1) * (maxdist / curve)
endfunction


Ps. if u dont use jass its possible to use it in GUI also.

  • Custom script: call JumpParabola("Current Dist","Max Range","Curve")

@ doom_sheep

using parabola will remove your up, down and death triggers
 
Status
Not open for further replies.
Top