====== Mimic sector (XG class) ====== Class = mimic_sector The //Mimic sector// class is used to copy all the properties of one [[sector]] to another. This allows any sector(s) to take on the appearance of another instantly (useful for creating [[sector-over-sector]] tricks or completely disorientating the player). The properties that are copied during a mimic are: * Floor & ceiling heights * Floor & ceiling textures * Floor & ceiling texture offsets * Sector light and color * Sector type ===== Parameters ===== ^ Prm^ Name^ Type^ Meaning | | Ip0, Ip1| Target Ref,Target Num| [[lsref]], [[lsrefd]]| Target reference (Line → Sector). This tells Doomsday which sector(s) we want to receieve the mimicing. The mimic_sector class can only be used on lines and we need to reference one or more sectors, therefore we need an [[lsref]]. We set the target sector(s) using Ip0 and, if required by the reference type, the [[data_component]] Ip1. For example: * Target Ref = "lsref_line_tagged" * Target Num = 8000 | | Ip2,Ip3| Mimic Ref,Mimic Num| [[spref]],[[sprefd]]| Sector to mimic. This tells Doomsday which sector we want to mimic. As we've already selected a sector we now need to select another sector, but sectors don't directly reference sectors so we need an [[spref]]. For example: * Mimic Ref = "spref_highest_floor" | ===== Example ===== Line Type { ID = 5006 Comment = "Sectors with a tag matching this lines' tag will mimic the sector on this line's front side, when this line is shot" Flags = player_shoot Flags2 = when_act | any Class = mimic Type = timed_off Count = 1 Time = 1 Target Ref = "lsref_line_tagged" Mimic Ref = "spref_my_floor" } The line is triggered when the player shoots the line (Flags = player_shoot). 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 selects all sectors whoose tag is the same as this line's tag (Target Ref = lsref_line_tagged). It then copies all the properties from the sector on the front side of this line (Mimic Ref = spref_my_floor) and then applies them to the referenced sectors.