====== Plane move (XG class) ======
Class = plane_move
Moves a [[modding:plane]] (floor or ceiling) of a [[modding:sector]] to a given height. The [[modding:texture]] of the plane can be changed in the beginning or in the end of the move. A sound can be played when the move begins or ends, or at a given interval while the plane is moving. The type of the sector whose plane is being moved can be changed in the beginning and in the end of the move.
===== Parameters =====
^ Prm^ Name^ Type^ Meaning |
| Ip0,Ip1| Target Ref, Target Num| [[xg:refs:lpref]] | Reference to planes to move. |
| Ip2| Destination Ref| [[xg:refs:spref]]| Destination height (spref).
- spref_none: means the destination height is zero. Offseted by Fp2.
|
| Ip3| Move Flags| Flags| - pmf_crush: makes the plane crush things if they won't fit in the sector. Currently this is a hard coded to 10 damage per tic regardless of the speed of the plane movement (Fp1).
- pmf_abort_a: will activate the line that initiated the plane move if the moving of the plane is aborted. Non-crushing plane moves are aborted if a thing doesn't fit in the sector (for instance, someone is standing under a door while it's closing). Crushers won't be aborted.
- pmf_abort_d: will deactivate the line that initiated the plane move if the moving of the plane is aborted.
- pmf_done_a: will activate the line that initiated the plane move when the plane reaches its destination height.
- pmf_done_d: will deactivate the line that initiated the plane move when the plane reaches its destination height.
- pmf_follow: makes the other plane of the sector follow the moving one, keeping the height of the sector the same throughout the move.
- pmf_setorig: will update the plane's original height value after the move is done.
- pmf_1snd: allows the playing of sounds only for the first referenced plane.
|
| Ip4| Start Sound| Sound| Name of the sound to play when the move is begun. |
| Ip5| End Sound| Sound| Name of the sound to play when the move finishes. |
| Ip6| Move Sound| Sound| Name of the sound to play while moving. |
| Ip7| Start Texture Ref| [[xg:refs:spref]]| Spref to the texture that is set when the move is begun. |
| Ip8| Start Texture Num| Flat| Name of the flat (texture) to set when the move is begun. This is used if Ip7 is set to spref_special . |
| Ip9| End Texture Ref| [[xg:refs:spref]]| Spref to the texture that is set when the move finishes. |
| Ip10| End Texture Num| Flat| Name of the flat (texture) to set when the move is begun. This is used if Ip9 is set to spref_special . |
| Ip11,Ip12| Start Type Ref, Start Type Num| [[lpref]], [[lprefd]]| Reference to the sector whose type will be used for the moving plane's sector after the move is begun. * lpref_special treats Ip12 as a sector type ID number. |
| Ip13,Ip14| End Type Ref, End Type Num| [[xg:refs:lpref]] | Reference to the sector whose type will be used for the moving plane's sector after the move has finished. - lpref_special treats Ip14 as a sector type ID number.
|
| Fp0| | Float| Move speed as units per (35 Hz) tic. A speed of 2 will move the plane 70 units per second. |
| Fp1| | Float| Move speed while crushing, as units per tic. |
| Fp2| | Float| Offset to destination height. Positive values move the destination upwards. |
| Fp3| | Float| Move sound minimum interval, in seconds. |
| Fp4| | Float| Move sound maximum interval, in seconds. The move sound will be played at random intervals, the minimum defined with Fp3 and the maximum with Fp4. |
| Fp5| | Float| Time to wait before moving the plane, in seconds. |
| Fp6| | Float| Wait time increment for each plane that gets moved. Has an effect only if more than one sector is being affected. |
===== Speeds of original Doom plane movements =====
A reference for when one wishes their plane move XG to match the speeds of the games original plane movement types.
^ Movement Type^ Speed per tic^ Speed per second |
| Moving Floor| 1 unit| 35 units |
| 8-unit stairs| 0.25 units| 8.75 units |
| Door| 2 units| 70 units |
| Turbo/Blazing Door| 8 units| 280 units |
| Lifts| 4 units| 140 units |
===== Example =====
Line Type {
ID = 5006
Comment = "Lower when Player crosses"
Flags = player_cross
Flags2 = when_act | any
Class = plane_move
Type = timed_off
Count = 1
Time = 1
Target Ref = "lpref_my_floor"
Destination Ref = "spref_lowest_floor";
Start Sound = "bdopn";
End Sound = "bdcls";
Move Sound = "punch";
Fp0 = 3;
Fp1 = 0.2;
Fp3 = 0.2;
Fp4 = 0.4;
}
The line is triggered when the player crosses the line (Flags = player_cross). The line is active in any skill mode and any game type (Flags2 = any) and the line carries out it's action when active (Flags2 = when_act). When activated, the line begins moving the floor plane of its sector. The destination height is the lowest floor height of the adjacent sectors. The sound bdopn is played when the move is begun, and bdcls is played when the destination height has been reached. The punch sound is played at random intervals while the plane is moving (min: 0.2 seconds, max: 0.4 seconds). The planes will be moved 3 units per game tic, which means they move 105 units per second.
===== See also =====
* Another way to move planes is the [[xg:class:build_stairs|Build Stairs XG class]].