• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How can i make something appear to the right of the unit?

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Title. Like always something that appears at their right.
I dont really get how to use polar offset much, can someone give me the exact numbers?

I want it to appear right next to the casting unit of the spell, facing the casting unit.
 
polar offset is like the same as a spell's target range or radius.

therefore, 1000 range infront of your hero is like if you had a 1000 range shockwave and blasted it infront of your hero, the distance it goes would be where your unit would be created.

if you want it to the right, you can use the arithmetic function and add 90 to the unit's facing angle. then the unit will come at an offset that will be directed in the (facing of the unit + 90) degrees.

e.g. if the unit is facing 0 degrees, then you add 90, and the unit will be created in a distance darting 90 degrees.

..............90...............
..............^................
..............||...............
..............||...............
180<====||====> 0....
..............||...............
..............||...............
..............||...............
..............v................
.............270..............
 
sure.

  • Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Create 1 (your unit) for (Owner of (Triggering unit)) at ((Position of (Triggering unit) [Position of triggering unit should be made into a variable then removed so that there is no leak]) offset by xxxx.xx towards ((Facing of (Triggering unit)) + 90.00)[this part would be Arithmetic, then you select the first button, Facing of triggering unit, then select the next button, 90] degrees) facing Default building facing degrees
      • Unit - Make (Last created unit) face (Triggering unit) over 0.00 seconds
 
Level 8
Joined
Aug 1, 2008
Messages
420
Thx. :D Would what the offset be? where you put xxx.xx
Would it be 0? seeing as i want the unit to be right next to the caster.
 
Level 8
Joined
Aug 1, 2008
Messages
420
Sorry for double post but i want you to look at it again by moving it to the top:

It doesnt work. sometimes it creates the unit to the top, or bottom, or any direction. ill paste my trigger here.

  • Unit - Create 1 Dummy for (Owner of RasenganCaster) at ((Position of RasenganCaster) offset by 5.00 towards ((Facing of RasenganCaster) + 90.00) degrees) facing (Position of RasenganCaster)
Im pretty sure its what you pasted.
 
it will create the unit to the right of the triggering unit, therefore, whichever way the unit is facing, it should create the unit to the right of that unit.

and i think 5 is too small, the collision size wouldn't allow it, so it would create it right ontop of the unit and make it come out at a random position.


you can either make the dummy unit's collision size zero or try an offset like 50
 
Level 8
Joined
Aug 1, 2008
Messages
420
nvm, got it. testing now.
nope, that definately doesnt work. sometimes it creates one at a random place, and not facing the caster. :/
 
Level 8
Joined
Aug 1, 2008
Messages
420
k here. Its under Rasengan. theres an ability to switch to naruto, use that, then learn rasengan and try it.
bear in mind its nowhere near done, and its just up to that bit.
I also changed it a bit from the last post, i dont know if it worked or not, havnt tested it.

I want him to face the casters hand, and to charge something into his hand with spell three animation. But its so hard..
Can you maybe find the exact coordinates so he dummys hands are actually almost touching the casters hand?
 

Attachments

  • ChidoriAndRasengan.w3x
    278.5 KB · Views: 55
Last edited:
Status
Not open for further replies.
Top