| 08-31-2002, 05:16 AM | #1 |
Guest | Ok. I need a little help. I have an array set up for my spawn points like so: Set spawn_points[1]=B <gen> Set spawn_points[2]=C <gen> Set spawn_points[3]=D <gen> Set spawn_points[4]=E <gen> Set spawn_points[5]=F <gen> Set spawn_points[6]=G <gen> Set spawn_points[7]=H <gen> Set spawn_points[8]=A <gen> Now what I am trying to do is have the monsters spawn at random locations. So this is what I am using. Events Time - Elapsed game time is 5.00 seconds Conditions Actions Set r= ((Random integer number between 0 and 7)+1) Unit - Create monster_amount monsters[i] for Player 12(Brown) at (Center of spawn_points[r]) facing (Random point in (Initial camera bounds)) Unit Group - Order (Units in spawn_points[i]) to Move To (Center of M <gen>) It will spawn the units at the same location everytime. It is spawning at spawn_points[7] everytime. Any ideas? |
| 08-31-2002, 06:25 AM | #2 |
Guest | I couldn't tell you, but when I was first experimenting with random numbers, they didn't work...then I tried my map on bnet, and they worked fine...try playing it on bnet, that might fix your problem... |
| 08-31-2002, 06:27 AM | #3 |
Guest | The testmap function (-loadmap) used in WorldEdit generates the exact same random #'s, variables, etc. when it runs your map. Don't use the testmap function if you want to truely test your maps out. ;) |
| 08-31-2002, 02:59 PM | #4 |
Guest | Thanks guys. I will try that. |
