Thread: [TUTORIAL]LCD Display (with custom values!)

Results 1 to 2 of 2
  1. #1
    Administrator Hezus's Avatar  
    Manager
    Join Date
    Aug 2001
    Location
    The Netherlands
    Posts
    9,045

    [TUTORIAL]LCD Display (with custom values!)

    The following link gave me lots of info on making a LCD screen which can count a value in-game. However, it misses a few pointers on how to set it up correctly and how to get custom values working. This tutorial covers that all!

    Part I: Display the health of an enemy on the LCD display

    Setting up Hammer:
    1. Load up lcd_display.wad (in the svencoop folder). You'll need these textures to make it work.
    2. Set up a room with a player and light.

    Creating the LCD display:
    1. Set up a small block and apply the +0~lcdcount texture to it. Other sides of the block can have a NULL texture.
    2. Turn this block into a func_wall and name it 'num_brush1'
    3. We're going to create a 3-digit counter, so copy that block twice and name them 'num_brush2' and 'num_brush3'. 'num_brush1' should be on the right, then num_brush2 in the middle and num_brush3 on the left. You can add more or less digits in the same fashion if you want.

    Creating a creature to be tracked:
    1. Add a monster_zombie. Name it 'zombie'.

    Create the LCD tracker:
    1. Add a trigger_numericdisplay with the following values:
    - Entity to track: zombie
    - Key to read: health
    - Base digit name: num_brush (it will automaticly sort out the numbers 1,2 and 3)
    FLAGS: Start on

    Compile and run the map. It should display the zombies' health (100 by default). Shoot the zombie and watch it's health drain on the display.

    Part II: Display a custom value on the LCD Display

    Now that's fun, but let's say we want to have the display track a custom value. For instance I want to to track a custom amount of points. Shooting the zombie will give us 2 points.

    Making a storage entity:
    1. Create a multi_manager. Now go into SMARTEDIT mode and add a custom key called 'frags' and value '0'. This will serve as our points counter. The LCD display will only read from existing keys in the engine. Creating your own key is possible if you want, read here.
    - name: points_counter

    Adding points:
    1. Create a trigger_changevalue.
    - name: add_2points
    - Destination entity: points_counter
    - Destination key: frags
    - Source value: 2
    - Action: ADD

    Resetting the LCD tracker:
    1. Go in the trigger_numericdisplay and change it to:
    - Entity to track: points_counter
    - Key to read: frags

    Making the zombie increase our points:
    1. Select the monster_zombie
    - Trigger Target: add_2points
    - Trigger Condition: Death

    Now shoot the zombie and watch you gain 2 points on the display!

    I hope this helped some of you out!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	2016-02-17_00001.jpg 
Views:	134 
Size:	237.9 KB 
ID:	16927  
    Last edited by Hezus; 01-08-2016 at 09:32 AM.

  2. #2
    Banned CryoKeen's Avatar
    Join Date
    Aug 2001
    Location
    United States
    Posts
    4,455

    Re: [TUTORIAL]LCD Display (with custom values!)

    this is cool thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •