• 🏆 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!

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