-
Notifications
You must be signed in to change notification settings - Fork 0
/
anti_rush.fgd
114 lines (105 loc) · 5.46 KB
/
anti_rush.fgd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Anti-Rush custom entity
// -by Outerbeast
//
// Getting Started:
// To install Download the package and extract into maps
// Registering the entity
// - Create a blank .as file, name it my_map.as
// - Open it and add the following code:-
// #include "anti_rush"
//
// void MapInit()
// {
// ANTI_RUSH::EntityRegister();
// }
// then save
// - In your map cfg, add the code then save:-
// map_script my_map
// Keys:-
// "classname" "anti_rush"
// Positioning:
// "origin" "x y z" - Position of the antirush icon sprite
// "angles" "p y r" - Orientation of the icon. Typically you would just change "y"
// "zoneradius" "r" - %age trigger zone radius. Default is 512, set value cannot go lower than 16. Radius is used by default if zone bounds are not defined/measured incorrectly
// "zonecornermin" "x1 y1 z1" - %age trigger zone bounding box min origin (if you are facing 0 degrees, this is the coords of the lower front right corner of the box)
// "zonecornermax" "x2 y2 z2" - Same as above but upper back left corner of the box
// "blockercornermin" "x1 y1 z1" - Blocker wall bounding box, follows same rules for dimensions as the %age trigger zone
// "blockercornermax" "x2 y2 z2" - Blocker wall bounding box, follows same rules for dimensions as the %age trigger zone
// Logic:
// "targetname" "trigger_antirush" - Add a targetname if you want something else, eg game_counter to trigger this
// "master" "antirush_master" - We can lock the %age trigger zone using this (direct trigger is still allowed)
// "netname" "thing(s)_to_target" - Triggers an entity when the anti_rush entity spawns and becomes active (Optional)
// "message" "thing(s)_to_target" - Triggers an entity when a player enters the zone for the first time. Each player is passed as activator.
// "percentage" "66" - %age of total players required to trigger. Default is 0 (%age is disabled).
// "target" "thing(s)_to_target_or_unlock" - Triggers a target when %age condition is met or triggered directly (this also has the add bonus of unlocking things with "master" that match the target)
// "lock" "*m;*n;*o" - Locks brush entities that use these brush models
// "delay" "t" - Time delay in seconds before triggering "target" and "killtarget".
// "killtarget" "thing(s)_to_delete" - Deletes an entity when triggered (Optional)
// Visuals
// "icon" "sprites/antirush/percent.spr" - Sprite to draw (obey env_sprite rules for positioning with origin/angles)- you can use your own sprite, or disable this using "No Icon" flag
// "noise" "buttons/bell1.wav" - Sound to play when the entity is triggered. This can be disabled using "No Sound" flag.
// "scale" "0.15" - Scales the icon sprite, default value is 0.15.
// "borderbeampoints" "a b c;d e f;g h i;" - List of points to draw barrier border beams. Minimum is 3 sets of points.
// AntiRush icon sprite rendering is done using the standard rendermode, renderamt and rendercolor keys. Below are the default settings:
// "rendermode" "5"
// "renderamt" "255"
// "rendercolor" "255 0 0" // This also affects the border beam coloration
// Note: the render settings cannot be changed externally via env_render or trigger_changelevel
// Flags
// "spawnflags" "f" - See below for flags for various settings
// 1 - "Start Off": Entity starts inactive, trigger to turn it on
// 2 - "Don't lock target": Entity will not lock entities who's master keyvalue matches this entity's target, if master exists
// 4 - "No Sound": Entity will not play a sound when triggered (Alternatively "sound" "sound/null.wav" can be used)
// 8 - "No Icon" : Disables the antirush icon (Alternatively "icon" "sprites/null.spr" can be used)
// 16 - "Remember Player": Players who already reached the zone then leave the zone afterwards will still be counted towards the %age
@PointClass sprite() size(-6 -6 -6, 6 6 6) color(255 0 0) = anti_rush : "Anti Rush"
[
angles(string) : "Pitch Yaw Roll (X Y Z)" : "0 0 0"
targetname(target_source) : "Name"
master(target_destination) : "Master"
target(target_destination) : "Target"
netname(target_destination) : "Start Trigger"
message(target_destination) : "Blocked Target"
killtarget(target_destination) : "Kill Target"
lock(string) : "Lock entities"
zoneradius(integer) : "Zone Radius" : 512
zonecornermin(string) : "Percent Trigger Zone Min (X Y Z)" : "0 0 0"
zonecornermax(string) : "Percent Trigger Zone Max (X Y Z)" : "0 0 0"
percentage(integer) : "Percent Required" : 66
blockercornermin(string) : "Barrier Min (X Y Z)" : "0 0 0"
blockercornermax(string) : "Barrier Max (X Y Z)" : "0 0 0"
borderbeampoints(string) : "Barrier Border Beam Points"
icon(sprite) : "Icon" : "sprites/antirush/percent.spr"
icon_drawtype(choices) : "Draw Type / Orientation" =
[
0: "Default"
3: "Parallel"
1: "Parallel Upright"
5: "Parallel Orientated"
2: "Facing Upright"
4: "Orientated"
]
rendermode(choices) : "Render Mode" : 2 =
[
0: "Normal"
1: "Color"
2: "Texture"
3: "Glow"
4: "Solid"
5: "Additive"
]
renderamt(integer) : "FX Amount (1 - 255)" : 255
rendercolor(color255) : "FX Color (R G B)" : "255 0 0"
scale(string) : "Scale" : 0.15
noise(sound) : "Sound" : "buttons/bell1.wav"
delay(string) : "Delay Before Trigger"
fadetime(string) : "Icon Fade Timeout"
spawnflags(flags) =
[
1: "Start Off" : 0
2: "Don't lock" : 0
4: "No sound" : 0
8: "No icon" : 0
16: "Remember Player" : 0
]
]