Releasing (somewhat) random items from a func_breakable

Discussion in 'Mapping Questions & Discussion' started by Dr. KillPatient, Oct 11, 2010.

  1. Dr. KillPatient

    Dr. KillPatient L3: Member

    Positive Ratings:
    I have a map that's Minecraft-themed, I want players to be able to break an ore block (func_breakable) and release one of five items, selected randomly. There will be a lot of these, so what's the best way to go about doing it and staying optimized entity-wise?
  2. Draco18s

    Draco18s L9: Fashionable Member

    Positive Ratings:
    5 point templates, logic_case, all five items.

    Each point template is linked to one item.
    Logic case points to each point template with the forceSpawn input.
    Breakable object links to the logic case with the pickRandomCase input.

    And you'll need to do that for each ore cube. I don't think there's a lighter way to do that.

    You may be able to use only the 5 point templates and the 5 items and use the entity teleport...stuff to move it to a location in the world, but I am unclear on how to use those entities. And you'd still need one teleport "exit" per ore cube and a way to know which exit is the active one.
    Last edited: Oct 11, 2010
  3. Tapp

    Tapp L10: Glamorous Member

    Positive Ratings:
    That's probably the best way, I'll see if I can rig up an "entity conservative" setup for you and post it here.

    <watch this space>