Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Difference between revisions of "func plat"

From Quake Wiki

(Created page with "Temporary, since this page didn't exist: <code> /*QUAKED func_plat (0 .5 .8) ? PLAT_LOW_TRIGGER speed default 150 Plats are always drawn in the extended position, so they wi...")
 
(func_plat redux!)
 
Line 1: Line 1:
Temporary, since this page didn't exist:
+
{{DISPLAYTITLE:func_plat}}
  
<code>
+
{{Infobox_entity
/*QUAKED func_plat (0 .5 .8) ? PLAT_LOW_TRIGGER
+
| classname = func_plat
speed default 150
+
| type = brush
 +
| class = [[Func (entity class)|func]]
 +
| quakec = [[plats.qc]]
 +
| precaches =
 +
'''plats/plat1.wav'''<br>
 +
'''plats/plat2.wav'''<br>
 +
'''plats/medplat1.wav'''<br>
 +
'''plats/medplat2.wav'''
 +
}}
  
Plats are always drawn in the extended position, so they will light correctly.
+
The '''func_plat''' is a moving brush entity commonly used for elevator creation.
  
If the plat is the target of another trigger or button, it will start out disabled in the  extended position until it is trigger, when it will lower and become a normal plat.
+
== Usage ==
 +
'''func_plat'''s are created in their "extended" position (for lighting calculation purposes).
  
If the "height" key is set, that will determine the amount the plat moves, instead of being  implicitly determined by the model's height.
+
When the player stands on top of a '''func_plat''', it starts moving vertically to a set height.
Set "sounds" to one of the following:
+
 
1) base fast
+
== Attributes ==
2) chain slow
+
If the ''height'' field is not set, it calculates it based on the '''func_plat''''s vertical size.
*/
+
Keep in mind '''func_plat'''s are created already at their target position when setting ''height''.
</code>
+
 
 +
=== Keys ===
 +
{| class="wikitable" width="100%"
 +
|-
 +
| ! bgcolor="#eeeeee" width="100px" | ''targetname'' |
 +
| The targetname of the Entity. If targeted, the '''func_plat''' will spawn in the extended position, and return to it's starting position when triggered and become a normal '''func_plat'''.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''target''
 +
| ''[TODO: When does the platform trigger?]''
 +
|-
 +
| ! bgcolor="#eeeeee" | ''height''
 +
| The vertical distance the '''func_plat''' moves.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''speed''
 +
| The speed at which the '''func_plat''' moves.
 +
|-
 +
| ! bgcolor="#eeeeee" | ''sounds''
 +
| The sound the '''func_plat''' makes while moving.<br>
 +
Multiple choices:<br>
 +
0. "None"<br>
 +
1. "Base fast"<br>
 +
2. "Chain slow"
 +
|}
 +
 
 +
===Spawnflags===
 +
The entity_name entity supports the following [[Entity#Spawnflags|spawnflags]]:
 +
{| class="wikitable" width="100%"
 +
! width="50" | Flag
 +
! width="150" | Common Name
 +
! Description
 +
|-
 +
| flag 1
 +
| Low trigger volume
 +
| ''[TODO: What does this do?]''
 +
|}
 +
 
 +
It also supports the standard spawnflags for difficulty and deathmatch presence.
 +
{{Template:Mode_spawnflags
 +
| entity = The '''func_plat'''
 +
}}
 +
 
 +
==Definitions==
 +
 
 +
===FGD Definition===
 +
This is the format used by [[TrenchBroom]] and [[Worldcraft]]. Note that the model(...) parameter is not supported by Worldcraft. This does not include the base class definition, which may also be required.
 +
<pre>
 +
@SolidClass base(Appearflags, Targetname) = func_plat : "Elevator"
 +
[
 +
spawnflags(Flags) =
 +
[
 +
1 : "Low trigger volume" : 0
 +
]
 +
speed(integer) : "Speed" : 150
 +
height(integer) : "Travel altitude (can be negative)" : 0
 +
sounds(choices) : "Sound" : 1 =
 +
[
 +
0: "None"
 +
1: "Base fast"
 +
2: "Chain Slow"
 +
]
 +
]
 +
</pre>
 +
===DEF Definition===
 +
This is the definition format used for most old Quake editors, including the original [[QuakeEd]].
 +
<pre>
 +
[ code from entity entry in a .def file goes in here ]
 +
</pre>
 +
 
 +
[[Category:Quake entities]]

Latest revision as of 16:05, 7 August 2019


func_plat
({{{commonname}}})
Entity type brush
Entity class func
Dimensions {{{dimensions}}}
Quake-C plats.qc
Precaches plats/plat1.wav

plats/plat2.wav
plats/medplat1.wav
plats/medplat2.wav

The func_plat is a moving brush entity commonly used for elevator creation.

Usage[edit]

func_plats are created in their "extended" position (for lighting calculation purposes).

When the player stands on top of a func_plat, it starts moving vertically to a set height.

Attributes[edit]

If the height field is not set, it calculates it based on the func_plat's vertical size. Keep in mind func_plats are created already at their target position when setting height.

Keys[edit]

targetname | The targetname of the Entity. If targeted, the func_plat will spawn in the extended position, and return to it's starting position when triggered and become a normal func_plat.
target [TODO: When does the platform trigger?]
height The vertical distance the func_plat moves.
speed The speed at which the func_plat moves.
sounds The sound the func_plat makes while moving.

Multiple choices:
0. "None"
1. "Base fast"
2. "Chain slow"

Spawnflags[edit]

The entity_name entity supports the following spawnflags:

Flag Common Name Description
flag 1 Low trigger volume [TODO: What does this do?]

It also supports the standard spawnflags for difficulty and deathmatch presence.

Flag Common Name Description
256 Not on Easy The func_plat will not spawn on Easy difficulty.
512 Not on Normal The func_plat will not spawn on Normal difficulty.
1024 Not on Hard The func_plat will not spawn on Hard difficulty.
2048 Not in Deathmatch The func_plat will not spawn in Deathmatch mode.

Definitions[edit]

FGD Definition[edit]

This is the format used by TrenchBroom and Worldcraft. Note that the model(...) parameter is not supported by Worldcraft. This does not include the base class definition, which may also be required.

@SolidClass base(Appearflags, Targetname) = func_plat : "Elevator"
[
	spawnflags(Flags) =
	[
		1 : "Low trigger volume" : 0
	]
	speed(integer) : "Speed" : 150
	height(integer) : "Travel altitude (can be negative)" : 0
	sounds(choices) : "Sound" : 1 =
	[
		0: "None"
		1: "Base fast"
		2: "Chain Slow"
	]
]

DEF Definition[edit]

This is the definition format used for most old Quake editors, including the original QuakeEd.

[ code from entity entry in a .def file goes in here ]