Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Making P9 units move randomly
Making P9 units move randomly
Aug 11 2010, 4:06 am
By: Aristocrat  

Aug 11 2010, 4:06 am Aristocrat Post #1



Say I have a bunch of p9 observers that are followed by 1x1 locations; I want them to basically move around the map in a junk yard dog fashion; is this possible to do without resorting to location grids?



None.

Aug 11 2010, 5:23 am rockz Post #2

ᴄʜᴇᴇsᴇ ɪᴛ!

burrowed units with randomized orders. it's pretty ridiculous that you can't get one slot free to use for this.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 11 2010, 12:25 pm NudeRaider Post #3

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

I see another problem: You need to prevent the locations from swapping to another observer when they fly over each other.
I guess you're trying to make a collision check with whatever comes near the observers, so it might be better to have them followed by a location that checks for observers.




Aug 11 2010, 12:48 pm Aristocrat Post #4



Quote from rockz
burrowed units with randomized orders. it's pretty ridiculous that you can't get one slot free to use for this.

I'm making a 8-player map with four teams, so I'd rather not resign to using computers. What do you mean by "burrowed units with randomized orders"? Preplace a static grid and give a random number of them to player 10?

Quote from NudeRaider
I see another problem: You need to prevent the locations from swapping to another observer when they fly over each other.
I guess you're trying to make a collision check with whatever comes near the observers, so it might be better to have them followed by a location that checks for observers.

I set up something similar to that (a 1x1 location checking for collision and killing the other observer, and the respawn trigger should pick up the 1x1 location and put the observer somewhere), but it occasionally doesn't work. I guess I will post the map when I get back on my computer.



None.

Aug 11 2010, 1:58 pm NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

What he means is you preplace a couple of burrowed P9 units around your map and then order the observers to a location centered on a random burrowed unit.




Aug 11 2010, 3:16 pm rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

place ~32/64 zerglings at random in the area you want them to be in. There's no function to do this, just sort of scatter them around.

Give 0 zerglings owned by player 9 at location to player 10.
Center location 0 on zergling owned by player 9 at location.
Give all zergling owned by player 10 at location to player 9.
Generate your random 5 bit number. //optional. You can also just randomize switch, give units 5 times via binary countoffs.
Give random 5 bit number zerglings owned by player 9 at location to player 10. //you'll need binary countoffs here
Center location 1 on zergling owned by player 9 at location.
Give all zergling owned by player 10 at location to player 9.
Order all protoss observer at location 0 move to location 1.


Repeat this trigger set 32 times, with the starting value increasing by 1 every time, ie:

Give 1 zerglings owned by player 9 at location to player 10.
Center location 0 on zergling owned by player 9 at location.
Give all zergling owned by player 10 at location to player 9.
Generate your random 5 bit number.
Give random 5 bit number zerglings owned by player 9 at location to player 10.
Center location 1 on zergling owned by player 9 at location.
Give all zergling owned by player 10 at location to player 9.
Order all protoss observer at location 0 move to location 1.


Place the trigger under "All Players" but put a death count condition in each of the steps, so that they only happen once (this is why computer players are so useful). I'm a bit lost on how exactly to do this easily. On the first trigger run, if all players have exactly 0 DC, set DC to 1 for current player (don't preserve it). Have another trigger detect when a player has left, then set that player's DC to 0. The only way I know to detect when a person leaves is via a unique unit or detecting when a trigger doesn't run.

So the pre-triggers should looks like this:
All players have suffered exactly 0 deaths of DC
Set DC to 1 for current player

Player 1 command exactly 0 unit
Set DC to 0 for Player 1.

Player 2 command exactly 0 unit
Set DC to 0 for Player 2.
etc... up to player 5


Preserve isn't necessary on these 6 triggers, since they'll only fire when a person leaves or at the start of the game. Player 1 will never actually run any of the triggers except the first one at the start of the game, so you can theoretically check all players for the first trigger, then player 2-8 for the second, then 3-8 for the 3rd, etc... I only included 5 players because if only players 6,7,8 are left, and player 6 leaves, the game is over.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[06:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[06:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[02:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[02:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
[2026-7-14. : 11:43 pm]
Ultraviolet -- let's take each other's clothes off :teach:
[2026-7-14. : 11:03 pm]
Vrael -- :teach:
Please log in to shout.


Members Online: MarineElite, IlyaSnopchenko