random positions?

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
i'm trying to set up a situation where an event happens at a random spot in an area on my map at random intervals.

lack of a math_randomiser is annoying, but i've jerryrigged (using random timers) a coordinate generation system that will give XYZ values within a range, and offset if needed.
my problem though, is i can't see anyway to feed this information into an entity, so it is placed/teleported to the coordinates that are generated.

does anyone know how to set positions (without hardcoding it) of entities.
also using logiccases isn't really gonna cut it here, as we're talking about areas that are at least 512x512 in size... and making 512 cases across 32 logic cases per axis is not gonna happen. plus it'd be useless if i wanted to use different sizes.
 

-gr-

L1: Registered
Jul 11, 2008
17
12
An idea:

Parent your target entity to an invisible train, and have the train move through your area at high speed. Where it will be exactly will be mildly predictable, but have the appearance of being random, depending how often the event occurs.

Attached .vmf & .bsp demonstrate what I mean.

Of course, this is no good if you require absolute precision, but if that's the case, there are other options.

More information about your requirements for the system you're creating, both visually (if applicable) and logic flow, would be helpful in working out a solution.