random positions?

Discussion in 'Mapping Questions & Discussion' started by Ezekel, May 24, 2009.

  1. Ezekel

    Ezekel L11: Posh Member

    Messages:
    818
    Positive Ratings:
    244
    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.
     
  2. -gr-

    -gr- L1: Registered

    Messages:
    17
    Positive Ratings:
    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.