1. Post #1
    Nornan12's Avatar
    May 2010
    61 Posts
    (First of all, please note that this map is being made for Half-Life 2, not GMod specifically) I've almost made a fully functioning CoD zombies mystery box. It spawns a random weapon upon use and even plays the little jingle :3. However, there is a pretty big problem that I haven't figured out how to solve yet. For the real mystery box, the weapon will eventually disappear if you do not take it. My mystery box keeps the weapon in place until it is taken. So if the box spawns a crowbar or a weapon that the player already has the maximum amount of ammo for, the weapon stays in place. This causes two problems: The weapon occasionally jams the box lid and causes the box to lock up, even with "force close" on (the lid is a func_rotating_door). Second, if the box does continue to work, the next weapon that comes out often collides with the first one, causing them to infinitely bang together, creating particles, which lag the game, and loud sounds (though this problem isn't really that bad, it's much less than pleasant).

    The only solution I could think of was to make an output that "killed" the weapon entity after a few seconds. Unfortunately, when that happens, the weapon completely stops spawning, resulting in the box often spawning nothing over time.
    Reply With Quote Edit / Delete Reply Windows XP United States Show Events Mapping King Mapping King x 1 (list)

  2. Post #2
    TCB
    I AM A FIRE LORD
    TCB's Avatar
    December 2009
    7,160 Posts
    Teleport it to a far away room that the player won't access? Then when you need the crowbar, teleport it back to the box.

  3. Post #3
    Problems are hidden solutions (c)
    GoldPlatinum's Avatar
    November 2011
    1,576 Posts
    Make a point_template and put the weapons you wish on its list. After the desired weapons are killed, just order the point_template entity to spawn a new weapon.
    Reply With Quote Edit / Delete Reply Windows 7 Slovenia Show Events Mapping King Mapping King x 1 (list)

  4. Post #4
    Gold Member
    Ereunity's Avatar
    January 2006
    3,797 Posts
    Make a point_template and put the weapons you wish on its list. After the desired weapons are killed, just order the point_template entity to spawn a new weapon.
    I was typing before reading the thread. Glad I checked the thread because I would have said this exact same thing.

    Do what this man says and use a point_template.

  5. Post #5
    Nornan12's Avatar
    May 2010
    61 Posts
    Make a point_template and put the weapons you wish on its list. After the desired weapons are killed, just order the point_template entity to spawn a new weapon.
    But if the weapon is killed, I thought that meant that the point_template will have nothing to spawn. I'll give it try, though.

  6. Post #6
    Problems are hidden solutions (c)
    GoldPlatinum's Avatar
    November 2011
    1,576 Posts
    But if the weapon is killed, I thought that meant that the point_template will have nothing to spawn. I'll give it try, though.
    Think that hammer keeps the reference entity your willing to spawn in its cache.
    Reply With Quote Edit / Delete Reply Windows 7 Slovenia Show Events Agree Agree x 1 (list)