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

Directions

Status
Not open for further replies.
Level 19
Joined
Jan 22, 2011
Messages
3,980
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,980
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