Thread: Tutorial 1 - Making Simple Lifts (using func_plat, func_door or func_train.)

Results 1 to 3 of 3
  1. #1
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,474

    Tutorial 1 - Making Simple Lifts (using func_plat, func_door or func_train.)

    Tutorial: Lifts, Moving Platform and Elevators.

    Layout:
    1) Below find a list of Observations, Tricks, Tips, Limitations and "Things you Should Know" before deciding which Entity to use as the Base for building your Lifts.
    2) Then examine, the Example Map for the Lift Type you want, paying attention to "Attributes and SpawnFlags used"

    At some point in your maps, you probably want or need a "Lift". There are Many different ways of "Emulating" (Faking) what looks like a Lift in Half-Life and even a few more when designing Maps for Sven-Coop.

    Entity: func_plat (short for func_Platform)
    First thing to realise/know is that Half-Life was originally released as a Single Player MOD.

    Entity::func_plat therefore was designed with the assumption your map would only have one player in it.
    - func_plat therefore by default activates when any "Player Steps on it".
    - func_plat has a tends to "Auto Return" [Unless Player "Jumps Off" Lift, it is "Touched again" and becomes reactivated.]
    - func_plat bounces on a Players Head if Blocked. [ Hence a "Disconnected/Frozen/Glitched" Player may accidentally block a Lift and stop Other Players from progressing through a Multi-Player map. ]
    - func_plat should "start or be initialized" in the "Top/Positve" position.

    Lift 2 in the Example Map is a "func_plat".

    Sven Coop Maps tend to be Multi-Player, so in general be aware of how "func_plat" operates. (i.e. Don't use it, there are MUCH better Entity's available.).

    EDIT/Correction/Explanation: Don't use it if you want a "Real Life Lift", if you want a Platform that auto starts when player touches/crosses hull edge then USE it. For instance you have spawned 10 gnomes in map and want at least one player to be able to get away on the lift, Or Players spawn on a cliff and need to get down, then this "auto start" and "auto return behavior" is probably a better fit with your map layout and as it reduces player waiting time. (i.e. It can be useful if gameplay is always in one direction when you approach the lift and the Lift will be used "a Lot" due to respawning.)

    Entity::func_door
    Using a "Door" to simulate a Lift, has always been possible. (The entities share much of the same Code in Half-Life.)
    However func_door in Sven Coop is quite different (It was re-Coded by Nev for SC 4.8)

    Why might you want to Use Entity::func_door ?
    - func_door has many more attributes available, allowing you to create a customized Lift.
    e.g. SpawnFlag "Start Open" [initialize Lift where you want], Master [find "Key" before allowed to use/activate], Target [Trigger something when it is used] etc. etc.
    - Breakable / Repairable Lifts. (Make sure some sort of alternative Route is available!)

    Restrictions/Warnings etc:: The Default Behavior for Enemy NPC & Monsters is to Attack ANY repairable object they find.
    Also Note: The Entity "func_door" was designed for use as a "Door", so the "Lip" attribute has a Max unit value of around 255. As a result when you design a map but want the "height/distance" traveled by your Lift to exceed 255 Units, make sure you design with ample "Above and/or Below" space as required.
    There is a bug (which seems to occur when you Both exceed 255 Units, then Damage and Repair a "func_door" Lift).

    Lift 1 in the Example Map is a Simple "func_door" Lift.
    (Lift 4 is an More Complex Example of a "func_door" Lift)


    Entity::func_train
    If you do not require a "breakable lift", this is the Entity to Use.

    Reasons:
    - Lots of available attributes means greater flexibility and control.
    - Almost any type of "Lift" you want (simple or complex) can be built.
    - Reliability (no inbuilt "Auto Features", once you design it with the correct entity set-up, it should work and keep working).

    Restrictions/Warnings etc: Because you can build almost any behavior into your "Lift" you want, the Entity List required to Control the "Lift" setup can grow rapidly (As set-ups becomes more complex it becomes easier to make mistakes, get confused or accidentally cause something unexpected to happen.).

    Lift 3 in the Example Map is a Simple "func_train" Lift.

    I will explain in more detail how "func_train" works, the need for "path nodes" as well building for as Multiple Floors, Synchronized Multiple Inner and Outer Lift Doors, Auto returning a Lift to a designated Level/Floor etc in "Tutorial 2 - Complex Lifts using func_train".

    Rights/Copyright: Copy, Paste, Uses and Abuse Source/Example map(s) as you wish for your own knowledge and maps. However if you repost the "text or the source map" on some other site, please add the following Discalmer and a Link back to this thread.:

    "The Text and Example map where designed for use with the Sven-Coop MOD & Engine, and may not work due to a lack of Entities or even be applicable/work for Other MODS".

    Attached: 7-Zip with example "_sc_tutorial1_lifts.map" (map format) and playable "_sc_tutorial1_lifts.bsp"

    EDIT: Link to Next Tutorial2a
    Attached Files Attached Files
    Last edited by wolf-3d; 15-07-2014 at 03:40 AM.
    Regards
    Wolf-3D

  2. #2
    Registered User Loulimi's Avatar
    Join Date
    Jul 2013
    Posts
    88

    Re: Tutorial 1 - Making Simple Lifts (using func_plat, func_door or func_train.)

    Does the func_plat_rot work as the func_plat?
    Loulimi (also Barney, barney27, Loullimi)
    I want to save the Goldsource's knwoledge and community.
    Creator of the mod Shift-Two.

  3. #3
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,474

    Re: Tutorial 1 - Making Simple Lifts (using func_plat, func_door or func_train.)

    Quote Originally Posted by Loulimi View Post
    Does the func_plat_rot work as the func_plat?
    More or less - yes.
    For example change the "func_plat" in the map file to "func_platrot", then re-compile. in game you should not see any difference because you have not yet "set" or provided a value for "spin amount" (rotation speed). Exit SC and on func_platrot find the attribute "spin amount" (rotation) and set to around 96 [Note the speed of the lift is 64, so any value less than speed, is going to do almost nothing because the distance traveled is approx 512 units.]

    The drawbacks/problems are firstly the same as for func_plat (Entity was built for "HL Single Player Game", so auto starts when touched, bounces etc.)
    Secondly you have the added problem of rotation, It is unlikely a "square" platform would line-up without a lot of trial and error because the Entity uses a Starting Reference Point + Rotation. {You have to work out the alignment, so recommend you change the platform to a "round" or "hexagon" shape, to make things easier.}
    Regards
    Wolf-3D

Posting Permissions

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