You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ms.stx
+37-59Lines changed: 37 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ $float //(<precision>,<number>) - Returns <number> as a float with <precision>
38
38
$can_damage //(<target_ent>,[targetting_ent]) - Returns 1 if <target_ent> can be damaged by [targetting_ent] which is assumed to be the calling script, if ommited (MAR2008a)
39
39
$filesize //(<filespec>) return size of a file - path begins at root, use forward slashes, eg. $filesize(maps/edana.bsp)
40
40
$filehash //(<file>,[hash]) - if [hash] is unprovided, returns the hash for the file, or 0 if not found. If [hash] is provided, returns 1 if hash mathches.
41
-
$func //(<event>,[params]) - Calls <event> and replaces itself with the result of the return statement within. (Won't work with delays, but will work with calleventloop's)
41
+
$func //(<event>,[params]) - Calls <event> and replaces itself with the result of the return statement within. Returns 0 instead, if the value returned is empty. (Won't work with delays, but will work with calleventloop's)
42
42
$getcl_beam //(<beam_idx>,<property>) - returns property of beam as described in beam_update above (mostly for debugging)
43
43
$get //$get(<entity>,<property>,[options]) - get a property from a server side entity (see $get'ables and Scripting_AllDocs.txt for more info), propertie same as $get_by_idx below:
@@ -254,7 +254,7 @@ $min //$min(<1>,[2]..[n]) - returns the lowest number in a series of floats
254
254
$max //$max(<1>,[2]..[n]) - returns the highest number in a series of floats
255
255
$get_sky_height //(<origin>) returns Z coordinate of sky brush - screwy sometimes, $get_traceline is more dependable
256
256
$get_under_sky //(<origin>) returns if point is under sky (at all - isn't fooled by sloppy brushwork)
257
-
$get_token //(<token_string>,<idx>) returns an item in a token string
257
+
$get_token //(<token_string>,<idx>) returns an item in a token string. Returns 0 if index is out of bounds.
258
258
$get_token_amt //(<token_string>) returns # of items in a token string (remember, token strings are index 0, but this counts the full amount)
259
259
$getcl_tsphere //(<origin>,<range>,[flags]) - Clientside, assembles a token string of model indexes in <range> from <origin>.
260
260
//flags: players (only include players) addbrushes (also include brushes with origins) [system cannot determine the distance of brushes without origins]
@@ -306,7 +306,7 @@ setvarg //<name> <value> - set a variable globally, has issues, server side only
306
306
const //<name> <value> - set a constant (can't be read by higher scripts, overrides const definitions in lower scripts)
addvelocity //(pitch,yaw,roll) - add speed to a target, see also setvelocity
309
+
addvelocity //(pitch,yaw,roll) [override] - add speed to a target, see also setvelocity. Push resist == stun resist, it is automatically adjusted unless override is specified.
310
310
blood //<red|green|none>
311
311
cancelattack //(items only) cancels/resets current attack
312
312
catchspeech //<event> <trigger_words...> - calls event when NPC hears any trigger_words from local chat
setsolid //<none/box/slidebox/trigger> - set object solidity (monters will not walk through, regardless of setting)
520
521
setstat //<skill> <value> - Best used to set monsters parry scores.
521
-
setvelocity //<target> <(vector)> - Sets the velocity on <target> to the specified value
522
+
setvelocity //<target> <(vector)> [override] - Sets the velocity on <target> to the specified value. Stun resist == push resist, it is automatically adjusted unless override is specified
522
523
skilllevel //set experience value for monster (Use NPC_GIVE_EXP in monsters/base_monster)
523
524
sound
524
525
play3d //sound.play3d <sound> <volume> <origin> [attenuation] [channel] [pitch] - client side playsound at origin
@@ -535,6 +536,7 @@ token //(see next)
535
536
add //token.add <token_string> <string> - adds <string> to <token_string> as new token
536
537
del //token.del <token_string> <token_index> - removes token #token_index
537
538
sqrt //$math(sqrt,<num>) - not available as an independant command
//- If prefix begins with * - <prefix>_dodamage will be called on <inflictor> instead of <attacker>, sans the * (for weapons)
638
640
//= "nodecal"
639
641
//- Causes trace damage events not to decal walls (note that they still fire hitwall/game_hitworld when calling from an item/weapon script)
640
-
hitmulti //<target> <ratio> - multiplies hit chances by this ratio (for instilling to-hit penalties)
642
+
hitmulti //<target> <ratio> - multiplies hit chances by this ratio (for instilling to-hit penalties) (0 returns hitmulti to normal)
641
643
torandomspawn //<target> - moves to a random ms_player_spawn within 256 units, if any
642
644
callclitemevent //<item_id> <event_name> <params...> - calls event on item, only affects owner's client
643
645
clearplayerhits //<monster> <player|all> - clears record of hits on monster (used to calculate xp) from a specific player or all
@@ -790,21 +792,32 @@ trade
790
792
791
793
//common dmg types
792
794
holy //all but undead/demon immune by default (also players with signfigant darkness contamination)
795
+
holy_effect
793
796
dark //damages everything, though some things are resistant
797
+
dark_effect
794
798
earth //rarely used, earth damage is blunt unless directly channeled
795
799
cold
800
+
cold_effect
796
801
fire
802
+
fire_effect
797
803
lightning
804
+
lightning_effect
798
805
blunt
806
+
blunt_effect
799
807
slash
808
+
slash_effect
800
809
pierce
810
+
pierce_effect
801
811
poison
812
+
poison_effect
802
813
acid
814
+
acid_effect
803
815
siege
804
816
training
805
817
apostle
806
818
magic //can't be parried
807
819
target //can't be parried, usually 0 damage for target gathering that's stopped by walls
820
+
stun //while not a dmgtype, still used with $get_takedmg() to determine stun resistance
808
821
809
822
//setbbox
810
823
animsize
@@ -1043,25 +1056,8 @@ NPC_IS_TURRET //Set this to 1 on mobs that don't move
1043
1056
NPC_PASS_APPLYEFFECTS //if set to a target, applyeffects used against script with this var will instead be applied to that target, if it is valid
1044
1057
EFFECT_IGNORE_CLEARFX //when set to 1 in an applyeffect script, this setvard prevents removal via clearfx (though can still be removed directly via removeeffect).
1045
1058
1046
-
//immunes - setting takedmg on any of these will set this var accordingly, automagically (JUN2007a)
1047
-
//if takedmg xxx 1.0 - IMMUNE_XXX will be set 0.99 (as IMMUNE_XXX == 1 means total immune, while takedmg xxx 1.0 = 100% dmg)
1048
-
//players have an alternate set callsed PIMMUNE_ - so monsters can check immunity of players even if they are immune themselves ( $get(x,scriptvar,y) local conflict)
1049
-
//- see newer method: $get_takedmg(<target>,<type>)
effect_defile //<duration> <attacker> [dmg] [ratio] [skill] (increases damage from all sources, dark DOT, generally low but with prolonged duration) //EFFECT_ID DOT_defile
@@ -1627,10 +1603,12 @@ callevent //<delay> <event_name> OR <event_name> [params...]
1627
1603
calleventloop //<#_of_iterations> <event_name> - loop event_name X times. Progress of loop stored in game.script.iteration - loops can be embedded
1628
1604
calleventtimed //same as callevent <delay> <event_name>
1629
1605
callexternal //<target|players|all> <event_name> [params...] - calls script on another target
1630
-
clientevent //<new|update|persists> <target|all> <script_file|script_idx> <event_name> [params...] - see client side scripting docs
1606
+
clientevent //<new|update|persists|remove> <target|all> <script_file|script_idx> <event_name> [params...] - see client side scripting docs //"remove" stops the effect from persisting, but does not remove any active scripts.
0 commit comments