• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Directions

Status
Not open for further replies.
Level 19
Joined
Jan 22, 2011
Messages
3,968
S I am working on a new map, in which you can create this big arrows on the floor (buildings) and whenever a unit enters in contact with them, they will walk towards the direction the arrow is pointing, up to the limit of the map if they don't step in another arrow. So far, I have managed to:

1. Rotate an arrow

But I have trouble setting up the point for the direction as well as getting exactly the units I want, although I managed to somewhat make the second point by using an aura, although it wouldn't work out with more than one arrow, which is useless to me.

Any ideas on how to do this?
 
Level 15
Joined
Nov 30, 2007
Messages
1,202
How accurate do you need it to be? What happens if something is in the way?

determine the X and Y borders of the map and issue the unit to go to that coordinate. you will have the unit's current coordinate and the matching border. So for example if the arrow points East you'd use the maps highest X value and he units current y value. Does this make sense?
 
Level 19
Joined
Jan 22, 2011
Messages
3,968
How accurate do you need it to be? What happens if something is in the way?

determine the X and Y borders of the map and issue the unit to go to that coordinate. you will have the unit's current coordinate and the matching border. So for example if the arrow points East you'd use the maps highest X value and he units current y value. Does this make sense?

Well, there's a direction for each angle of a circle, so there's 360 directions. Although to be honest I think I will break that down to 8 (north, south, east, west, north-east, north-west, south-east, south-west)

Well, that solves one problem I guess.

Can't you do something like:

location1 = location of your arrow
locaiton2 = location1 offset by 99999 towards angle of arrow
order your unit to move to location2

The problem is that since the arrows aren't originally in the map, but user created, It's difficult to detect them. I did use this and the units that entered the arrow couldn't move, but that was probably because of the aura.
 
Status
Not open for further replies.
Top