Incendio gimmicks

Discussion in 'Tutorials & Resources' started by x6herbius, Apr 17, 2014.

  1. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    After having a surprising amount of success with early tests of Arena Incendio, I thought I'd explain some of the entity setups I have in the map. A lot of these borrow contents from the Harry Potter games 1-3.

    Spongify tiles

    [​IMG]

    Making use of TF2 Hammer's poorly implemented version of the instancing system, I have most things as instances. With the spongify tiles, I can specify the push force applied to the player as an instance parameter.

    The basic mechanics of the tile (aside from enable/disable relays and the jump sound) are:
    1. Tile base. This is compiled as a model using Propper, simply so that I can send it a Skin input to change from deactivated (plain green) to activated (glowy purple).
    2. Tile hologram effect. This is two func_brushes, one with a custom material applied which uses the animated TF2 water refract normal map.
    3. Tile particle effect. This is a custom particle effect which is switched on when the tile is active. It creates cute little colourful jumping fragments.
    4. Inner trigger. When a player is touching this it enables a logic_relay, and the relay is disabled when the player stops touching this. The logic_relay is fired when the player jumps, activating a trigger_push.
    5. Tile trigger. When a player stops touching this trigger the jump relay is fired, which switches a trigger_push on for 0.2 seconds before switching it off again. The inner trigger ensures that the player is relatively central on the mat, so that walking off without jumping doesn't fire the push trigger.
    6. Push trigger. This accepts the push force instance parameter. If the player is within the central trigger (4) and jumps on the tile, the OnEndTouch output from the bottom trigger (5) is fired, causing this push volume to be briefly activated.

    Although much more critical to controlling access to areas in the original Harry Potter games (you didn't have rocket launchers to jump around with), the spongify tiles can still allow players to be boosted higher and with more accuracy than explosive jumping would allow, and allow any class to make a jump. I used this to hide spells in high-up places which required precise aiming in order to reach them, making explosive jumps less feasible. The disadvantages of the spongify mats are that if multiple people are standing on them and one person jumps (or even walks) off the mat, it will activate the jump function for everyone within the mat's region (although this situation appears to rarely be encountered in practice). If players crouch and jump on the tile this also causes issues, as their bounding box may leave the trigger_push volume early and limit the velocity impluse they gain. One option would be to simply extend the trigger_push further into the air, but this could interfere with players who appear not to be on the mat; another might be to reduce the amount of time the trigger_push is active for but increase its power, meaning that the physical time the player's bounding box spends inside the trigger_push is less critical for the amount of impulse they gain. The current boost time of 0.2 seconds helps reduce the likelihood that crouch jumping will ruin it, but it's still possible if you crouch quick enough.

    Lumos platforms

    [​IMG]

    The static lumos platforms are simply clips (to stop projectiles from colliding with them) with a particle effect and textured box alongside them, but there are also spawnable platforms that contain a trigger_teleport - if they are spawned when a player is inside them, the player is teleported on top of the platform to prevent them getting stuck.

    These are made out of:
    1. Clip brush. This is a func_door because player collision is a bit funky on func_brushes.
    2. Trigger_teleport. In theory, a platform could be spawned anywhere at any time without knowing whether there was a player in the way or not, so the trigger_teleport is contained completely inside the platform. If the platform is spawned and a player gets trapped, they will come into contact with the trigger_teleport and will be teleported on top of the platform instead.
    3. Teleport destination. See above.
    4. Visual brush. This is in response to learning that some players have particles turned off and so cannot see where the platforms are by particle effects alone.
    5. Particle effect. Mimics the style of the platforms in the first Harry Potter game.
    6. Point_template. Triggering this spawns the platform and its related entities.

    The lumos platforms are mainly useful for providing dynamic (as they can be switched on and off) risk/reward areas, such as the health kits in Incendio, but can also be used to provide access routes across otherwise impassable drops. In A5 I also included a red spawnable platform, which disappears after a certain amount of time has passed.

    Horklump mushrooms

    [​IMG]

    The Horklump mushrooms use meshes extracted from the second Harry Potter game and act in a similar way. When players breach the trigger_hurt a particle effect at the centre of the mushroom is triggered to release purple gas. I chose the "crush" damage type because the red screen flash was very obvious to players.

    Now that I've got my head around Blender, the Horklump mushrooms are animated!

    Spell buttons

    [​IMG]

    The rotating spell buttons act to trigger functions in the map when shot. They are comprised of:

    1. Func_rot_button. This provides the 180 degree rotation of the button. It is activated first when the button becomes enabled and last when the button becomes disabled.
    2. Func_door. This lets the button slide in and out of the wall. Is is activated last when the button becomes enabled and first when the button becomes disabled.
    3. Func_button representing the spell target: one side is lit up and the other side is greyed out. This is set not to move itself when pressed but is simply parented to the func_door, which in turn is parented to the func_rot_button. Upon enabling the spell button, this func_button is unlocked only when the spell button has protruded completely from the wall, and is locked as soon as it is shot. Note that we can do other interesting things here, such as only allowing the button to be activated by melee damage.
    4. Button timers. Upon spawning, most of the buttons in the map are set to their disabled states immediately and their timers are set running. There are two timers: the first activates after a random interval of time has passed (in Incendio, between 30 and 60 seconds) and enables the button, whereas the second fires after a set amount of time (in Incendio, after 8 seconds) and disabled the button again. Each timer also disables itself and enables the other when fired. This allows the buttons to become active for periods of 8 seconds; once they are shot or time out, they deactivate themselves again and wait another 30-60 seconds (unless they are one-off buttons, in which case they do not return at all).
    5. Press effect. This is used in conjunction with an ambient_generic to provide feedback to the player when a button is pressed.

    The temporal nature of the buttons introduces an element of randomness to the gameplay features they provide and ensures that their functions can't be spammed by players. They also help to add to the feeling that the map is alive independently of the players.

    Orange snail

    [​IMG]

    This is personally my crowning achievement of the map. The snail hurts players when it or its slime trail are touched, and explodes when shot. It is made up of:

    1. Snail model. Again, this is a dynamic prop taken from the second Harry Potter game. I really wish I were able to keep the animations.
    2. Func_tracktrain. This follows a path_track chain around the map, and all the snail entities are parented to this.
    3. Env_entity makers. Both of these are parented to the tracktrain; one is used to spawn a pumpkin for making the snail explode, and the other is used for spawning hurt triggers that lie in the snail slime.
    4. Func_breakable. When this is broken, the snail "explodes".
    5. Trigger_hurt. When touched, the snail makes an irritated noise and hurts the player.
    6. Particle effect. This creates the slime effect and is placed level with the floor. The effect spawns lots of yellow particles continuously, which fade out over time.
    7. Slime hurt template. In order to create the effect of the slime hurting players, a timer is started when the snail is spawned. On each tick, one of the env_entity_makers parented to the snail spawns this template, which "poops out" instances of the trigger_hurt at regular intervals.

    [​IMG]

    When a player touches the trigger_hurt the particle effect and sound are activated, giving the impression of an acidic burn. In addition, each time the template is spawned OnUser1 is fired on the trigger_hurt, which reacts by queueing a once-only I/O event to kill itself and its related entities after 3 seconds.

    [​IMG]

    8. Pumpkin template. When the breakable around the snail is broken, the other env_entity_maker spawns a pumpkin at the snail's position before immediately igniting it to give the impression that the snail has exploded.

    Powerups

    [​IMG]

    The powerups apply conditions to the player when picked up - as of A10 there are crit, minicrit and giant variants.

    1. Powerup model. This is a rotating vial whose skin is changed according to the effect it gives.
    2. Trigger_add_tf_player_condition. This is the trigger that applies the condition to the player.
    3. Trigger_multiple. Unfortunately the OnStartTouch output from the condition trigger is broken, so this trigger detects when a player "picks up" the powerup and disables everything for a short while.
    4. Effects. These include a custom particle effect and sound.
    5. Logic entities. For convenience, the relay will enable all the related spell entities when triggered, and the timer functions to refire the relay a set amount of time after a player has picked up the powerup.

    Skeletons
    The skeletons are just taken straight from Helltower (they're their own self-contained entity) and are spawned when one of the map buttons is pressed. They drop out of the high chamber in the bell tower. The only interesting thing I had to come up with in relation to them was how to clip the middle roof - I didn't want players to be able to get up there, but the skeletons are also affected by player clips so I couldn't just put one of those down. I eventually hit on the idea of using func_respawnroomvizualisers textured entirely with nodraw - a Red and Blue visualiser are in the same place on top of the roof but the skeletons aren't affected by these, so they can drop down as intended.

    And that's pretty much it so far. I'll try and keep this updated as I come up with more weird and wacky ways to starve the game of entity indices.
     
    • Thanks Thanks x 7
    Last edited: Apr 18, 2014
  2. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    You know what's hilarious? I only encountered that snail like twice in all the times I've played this map. Does it only spawn under certain rare conditions?
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    ...spongify? But... the icon and the function. Wouldn't springify be more applicable? Sponges are soft and shock absorbent.
     
  4. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    It's activated via a button in the back room. Unfortunately due to the construction of the tracktrain I can only have one out at a time (at least, it'd be a pain in the arse to get more than one to work).

    That was the original game's name for it, don't blame me. :p
     
  5. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    141
    just wanna say I love things like this
     
  6. Shanghai

    Shanghai L6: Sharp Member

    Messages:
    394
    Positive Ratings:
    217
    Maaaan this brings me back
    I played the shit out of Harry Potter and the Chamber of Secrets
     
  7. x6herbius

    aa x6herbius

    Messages:
    377
    Positive Ratings:
    271
    Game number 2. The correct choice.
     
  8. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,477
    Positive Ratings:
    1,367
    That was the first game that ever scared the shit out of me.

    [​IMG]

    What a stunt to pull on a 10 year old kid.
     
    • Thanks Thanks x 1