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

Spawn in random region

Status
Not open for further replies.
Level 8
Joined
Apr 13, 2006
Messages
174
How can I make a unit appear in a random region (one of 12 regions) and apply its acording camera.
I know that you didn't understand a thing so heres an example:

If 'trigger' happens:

-> Create Unit in random region (12 regions total)

-> Apply Camera x for player y (owner of the spawned unit)

[Camera 1 is facing region 1]
[Camera 2 is facing region 2]
etc...
 
Level 4
Joined
Jun 19, 2007
Messages
107
Trying to help :p

As I remember you can do it about this way:

  • Events
  • [Insert event here]
  • Conditions
  • [Insert here]
  • Actions
  • Unit - Create 'unit' in (Spawn + (random number between 1-12)) facing default building degrees.
  • Camera - Centre camera to location of (created unit) for owner of created unit.
Haven't been in WE for a while so I don't exactly know how this looks like, but it's something similiar.

For the region it should be called something like "spawn_1" to "spawn_12" and the trigger with for example (Spawn_ + (random number between 1 and 12).

Hope it's any help, good luck with your map!
 
Level 4
Joined
Nov 9, 2008
Messages
112
1st set the region variable

event- map init
cond-
act-
set SpawnLoc[1] = Region1<gen>
set SpawnLoc[2] = Region2<gen>
blah...blah...blah...

and spawn trigger
ex:
event-[your event]
cond-[your cond]
act-
create 1 (your unit) at SpawnLoc[Random Integer number between 1 and 12] blah.. blah...blah


ps:correct me if i'm wrong ;)
 
Status
Not open for further replies.
Top