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

Order cleared

Status
Not open for further replies.
Two problems

I have two problems what i need to be fixed in my map:

1)
In Pudge wars, when you catch any unit with hook, the unit still can throw hook or attack to other unit also he is hooked and moved.
Is there any function to turn on unit's orders when he is hooked?

2)
It was here before, but no one (i think) cannot do that.

What parameters is for bouncing with wall?
I use Angle -180 [But it working only for vertical sites and bad]

Please help.
 
Last edited:
Level 13
Joined
Apr 15, 2008
Messages
1,063
1) The unit is moved not through GUI - Move Unit, but through JASS SetUnitX and SetUnitY functions, which don't prevent it from acting at it's own (same technology as sliding, used in mapy maps)

2) for vertical walls, revert Y axis of the movement, for horizontal, revert X axis. In degrees, that would mean changing angle a to 360-a for vertical walls, and for horizontal a to 180-a
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
1. SetUnitX(unit, x) and SetUnitY(unit, y) which only alter the units current position like moving should.

2. Get the angle between the velocity vector of the projectile and the normal vector of the plane the projectile collided with. Then add that angle onto the angle onto the normal vector and you will have the reflection vector if directions are correct.
Obviously this method above will need countless unneeded conversions so it would be best to use vector maths to work out the reflection direction.

Obviously 2 is easy if you reflect it off verticle surfaces like normals of n*pi/2 where n is an integer.
 
1. SetUnitX(unit, x) and SetUnitY(unit, y) which only alter the units current position like moving should.

2. Get the angle between the velocity vector of the projectile and the normal vector of the plane the projectile collided with. Then add that angle onto the angle onto the normal vector and you will have the reflection vector if directions are correct.
Obviously this method above will need countless unneeded conversions so it would be best to use vector maths to work out the reflection direction.

Obviously 2 is easy if you reflect it off verticle surfaces like normals of n*pi/2 where n is an integer.

Yeah,thats the problem,i using GUI no JAZZ, so i can't set position of the type terrain.
Can you post some easy trigger how to do it please?
Thanks.
 
Level 11
Joined
Apr 6, 2008
Messages
760
  • Custom Script : SetUnitX('Unit',x)
  • Custom Script : SetUnitY('Unit',y)
x/y are cordinates (which im sure you went thru in math class), in order do point our these cords you calc it like this
JASS:
x = GetUnitX('Unit') + MoveDistance * Cos('Angle in radiance)
and
JASS:
y = GetUnitY('Unit') + MoveDistance * Sin('Angle in radiance)
 
Status
Not open for further replies.
Top