User Tools

Site Tools


ded:sector_type

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ded:sector_type [2018-10-20 07:52] – [Ambient sounds] skyjakeded:sector_type [2018-10-20 07:52] (current) – [Sector Type (DED, XG)] skyjake
Line 1: Line 1:
 +
 +====== Sector Type (DED, XG) ======
 +
 +
 +A //Sector Type// definition specifies the properties of a generalized sector type, for use with the [[:XG]] system. XG is a complex topic, with many core concepts which the mod author must be familiar with in order to use the system effectively. See the [[xg:reference_guide|reference guide]] for further information.
 +
 +The focus of this article is to detail how these properties are exposed to mod authors and the specifics of the syntax.
 +
 +
 +===== Core concepts =====
 +
 +
 +==== Ambient sounds ====
 +
 +Sounds can be played for ambient effect in sectors with this type. [[#Ambient sound]]s are played at the interval specified (which, is (possibly randomly) calculated according to the [[#Ambient_min_interval|minimum]] and [[#Ambient_max_interval|maximum]] interval range) and will appear to emanate from the middle of all sector(s) with this type.
 +
 +
 +==== Angles ====
 +
 +
 +All angles are specified in degrees of a **anticlockwise** system where 0=east, 90=north, 180=west and 270=south. All floating-point values are accepted (even negative ones) though they'll be cycled into a normalized range automatically.
 +
 +
 +==== Chains ====
 +
 +
 +Each sector type may specify up to four different chains; [[#Ceiling_chain|ceiling]], [[#Floor_chain|floor]], [[#Inside_chain|inside]] and [[#Ticker_chain|ticker]]. All chains are defined in the same way, however their behavior differs according to the chain type. See the [[:xg:chains#Sector_Type_Chains|sector type chain]] documentation in the [[xg:reference_guide|XG reference guide]] for more information.
 +
 +
 +=== Behavior flags ===
 +
 +
 +These flags determine how the relevant chain will behave, both how and when they are triggered. There are //_a// and //_d// variations, which specify whether the behavior is effective when the chain is activated or deactivated, accordingly.
 +
 +**Note:** Both versions of a flag **cannot** be used at once by the same chain.
 +
 +^ Name(_a/_d)^ Description |
 +| any| Any mobj cause a chain event to be sent. |
 +| missile| Mobjs that have the MF_MISSILE flag cause a chain event to be sent. |
 +| monster| Mobjs that have the MF_COUNTKILL flag cause a chain event to be sent. |
 +| other| Non-player mobjs cause a chain event to be sent. |
 +| player| Player mobjs cause a chain event to be sent. **player_a** will send an activating event and **player_d** a deactivating event. |
 +| ticker| Use only with the [[#Ticker_chain]]. Chain events will be sent based on the game ticker, up to 35 times per second. The chain's [[#Ticker_chain_start_time|start time]], [[#Ticker_chain_end_time|end time]] and chain [[#Ticker_chain_min_interval|min]]/[[#Ticker_chain_max_interval|max]] intervals can be used to configure how often the ticker sends the chain events. |
 +
 +
 +==== Functions ====
 +
 +Provide the means to automatically set specific properties of a sector to a dynamically resolved value as described by a function expression. See the [[xg:function_script|XG function]] documentation for a detailed description of function expressions.
 +
 +=== Ambient light functions ===
 +
 +Set the intensity of the ambient light or color to the value of the function expression. Ambient light functions support random evaluation intervals. For example, the intensity of the ambient light might be randomized to create an "electrical-fault like" effect.
 +
 +=== Plane height functions ===
 +
 +Set the height of the plane to the value of the function expression. Plane height functions support relative offsets and scale factors as well as random evaluation intervals. For example, the height of a floor plane might be oscillated to create a "wave like" effect.
 +
 +===== Syntax =====
 +
 +{{page>sector_type_syntax}}
 +
 +===== Examples =====
 +
 +==== Ticker chain triggering ====
 +
 +<code>
 +Sector Type {
 +  ID = 5002;
 +  Comment = "Immediately trigger line type 6101";
 +  Ticker chain = 6101;
 +  Ticker chain count = 1;
 +}
 +</code>
 +
 +A chain event be will sent once, immediately, to the [[xg:line type]] 6101.
 +
 +
 +==== Water current ====
 +
 +<code>
 +Sector Type {
 +  ID = 5001;
 +  Comment = "Scroll along tag 9999";
 +  Flags = tagtexmove | tagwind | windplayer;
 +  Act tag = 9999;
 +  Floor texmove speed = 1.8;
 +  Wind speed = 0.16875;
 +}
 +</code>
 +
 +The sector has a scrolling floor and wind that affects player mobjs. Wind will blow and the floor material will scroll, in the direction that sector line with the act tag 9999 is pointing. Material scrolling and wind speed are synchronized. This gives the appearance that the floor is moving and will move the player with it.
 +
 +
 +===== See also =====
 +
 +  *  [[xg:sector_type|XG sector type documentation]]
 +  *  [[xg:reference_guide|XG reference guide]]
 +
 +
  
ded/sector_type.txt · Last modified: 2018-10-20 07:52 by skyjake