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

A knockback way

Status
Not open for further replies.
Level 7
Joined
Aug 19, 2009
Messages
278
I have thought of making a new way knock back

Apart from the traditional knockback in jass using co-ordinates then tan etc.

I have thought of a new knock back system..

In it a a dummy unit is created at the position of the unit which is to be knockbacked. That dummy unit may be ground or flying as per requirements.

The dummy unit has a movement speed.
The dummy unit is made to move in the direction the push back was done.

Every 0.05 second the unit is made to move in the position of the dummy unit which was moving.

This way, we don't need to do work in checking if the knocked is made to move out of the terrain if we make the dummy a ground unit.

Incase we want knocking out of terrain we can use a flying unit.

We can terminate the loop in two ways.

1. after x seconds... because distance = speed * time
here speed is the movement speed of the dummy unit.

2. Incase of an up-pathable terrain we can test if the dummy moves in a straight line using (y=mx) function
we can either order the dummy to stop and wait for the knockback timer to get over or cancel the movement as a whole

As a whole this look a lot easier to me effective or not i cannot say.
Thoughts?
 
Level 8
Joined
Jan 8, 2010
Messages
493
if you're doing that, you should create a link between the knocked-back unit and the dummy unit, as you can't use a pick unit near the dummy unit. and the movement speed should decrease, 'cause having a constant movement speed will mess up the knock-back effect.
 
Level 7
Joined
Aug 19, 2009
Messages
278
Seting knockbacked unit X and Y to dummy unit X and Y each INTERVAL seconds can work.
But still you need projectile system to handle dummy unit.

we can just order it to move. I am default using MoveSpeedX in my map so i can set any speed to the dummy unit.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Not sure how this is easier. You describe a linear movement. That alone is already very specific/unflexible. And apparently this kind of movement is very simple to deal with in maths/physics. Of course, it's a bit more uneffective but also if you really take a ground/air dummy, the dummy can stumble on pathing blockers and therefore take a retour. To check this would indeed be costy.

Why rely on wc3 with its tons of kinks that you need to deal with when the problem is already simplest?
 
Level 7
Joined
Aug 19, 2009
Messages
278
Its just a testing any way... I am not sure how effective it is.

I am attaching a test map... Its not MUI yet but you can test i am giving a test map.

I placed the dummy unit 150 units infornt of the moving unit to avoid collision.

Currently i have just set the push back time as 3 seconds.

I won't use push back over long distances in my spell. Any way in some cases it looks very ineffective indeed.

I wonder why does this still push units over unpathable terrain.... Strange!!

Updated the edited map.. Guess its all useless then
 

Attachments

  • pb.w3x
    18.6 KB · Views: 49
Status
Not open for further replies.
Top