• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

Map movement triggering help

Status
Not open for further replies.
Level 4
Joined
Aug 11, 2005
Messages
101
Ok, basically i am making a map at the moment and in an etempt to cut off numerous triggering time and nursing my sore fingers at the end of the day i have a question for you all. Is it possible to give and order to a unit that when it enters region "A", that it is given a order to move to either region "B" or region "C"? So i need to know is it possible to make a unit randomly move to one of multiple region? Is this possible and if so how would i do this? Help would be greatly appreciated! :D
 
Level 3
Joined
Sep 18, 2004
Messages
45
yep

didnt understand you so i think 2 diff ways may solve ur problem....

if you wanted it to be random to go from either a to b or a to c....

first create a integer variable... and anme it wolf
event - map initialization

action- set wolf[1] = rect 1
action - set wolf [1] = rect 2

event - unit enters rect 1

conditions - XXXXXXXXXXXX


action - set wolf to random number between 1 and 2.....
wait 0.10

if wolf = to 1 then unit- order triggering unit to move to rect 1

if wolf = 2 then unit- order triggering unit to move to rect 1

second way.... ( if u meant it like this )

event - unit enters rect 1

condition - XXXXXXXX

action - unit - order entering unit to move too rect 2
 
Level 6
Joined
Sep 17, 2005
Messages
276
Re: yep

wolf_kid_is_me said:
Code:
action- set wolf[1] = rect 1
action - set wolf [2] = rect 2 <<<< here a 2 ^^

well it could be easier: RandomRect is a rect-variable array

Code:
EVENT:

Unit - A unit enters No rect

ACTIONS:

Actions
    Set RandomRect[1] = A
    Set RandomRect[2] = B
    Set RandomRect[3] = C
    Unit - Order (Entering unit) to Move To (Center of RandomRect[(Random integer number between 1 and 3)])
 
Status
Not open for further replies.
Top