由 S-22 发布的全部内容
-
MOHAA COD 等FPS游戏还是用官方版本的吧,其他非官方版本都做的不是很好,如果擅自增加了某个pk3包,就有可能造成游戏有问题。 或者等初十以前我完成文件检测工具,你检测一下把结果发上来,我再告知原因。
-
Description of the use of the huddraw set of script commands ------------------------------------------------------------ The huddraw script commands allow you to draw up to 256 different graphic icons on the player's hud. The element to adjust with each command is specified by an index number in the range of 0 to 255. They currently broadcast to all players, but that could be changed if the need arises. Commands Summary ---------------- huddraw_shader This sets the shader to use for a particular huddraw element. huddraw_align This sets the alignment of the huddraw element. Valid values for horizontal alignment are "left", "center", and "right". Valid values for vertical alignment are "top", "center", and "bottom". huddraw_rect This sets the position and size of the huddraw element. X and Y specify the position of the upper left corner position. Higher values of X move it to the right, and higher values of Y move it down. When you set the alignment, the XY position specified is relative to that alignment. For example, if you align it to the right edge of the hud, the X position should be less than zero so that it the upper left corner will be brough back to the left onto the screen. huddraw_virtualsize This let's you set the huddraw element's size and position according to a virtual screen resolution of 640x480. What this means is that it lets you treat the hud like it's always at 640x480, and it will be properly resized and positioned according to the actual resolution. huddraw_color This set the color of the huddraw element. Each color channel should be between 0 and 1. huddraw_alpha This set the alpha of the huddraw element. It should be set between 0 and 1. This is also used to turn off a huddraw element that is no longer wanted by setting the alpha to 0. huddraw_string This sets the huddraw element to display a string instead of a shader graphic. The size of the font can not be adjusted, but the color and alpha settings do affect the text. The width and height parameters of huddraw_rect are only used for alignment centering, Not for setting the size of the string. huddraw_font This sets the font for a string displaying huddraw element to use. The names of available font can be gotten from the game/main/fonts folder. The file names of the .ritualfont files in there are the names used for the fonts.
-
Syntax Summary ============== program: -------- statement_list statement_list: --------------- statement statement ... statement statement: ---------- identifier event_parameter_list : case integer event_parameter_list : case identifier event_parameter_list : compound_statement if prim_expr statement if prim_expr statement else statement while prim_expr statement for ( statement ; expr ; statement_list ) statement try compound_statement catch compound_statement switch prim_expr compound_statement break continue identifier event_parameter_list nonident_prim_expr identifier event_parameter_list nonident_prim_expr = expr nonident_prim_expr += expr nonident_prim_expr -= expr nonident_prim_expr ++ nonident_prim_expr -- ; compound_statement: ------------------- { statement_list } expr: ----- expr && expr expr || expr expr & expr expr | expr expr ^ expr expr == expr expr != expr expr expr > expr expr expr >= expr expr + expr expr - expr expr * expr expr / expr expr % expr nonident_prim_expr func_prim_expr func_prim_expr: --------------- identifier event_parameter_list nonident_prim_expr identifier event_parameter_list - func_prim_expr ~ func_prim_expr ! func_prim_expr identifier :: prim_expr nonident_prim_expr :: prim_expr event_parameter_list: --------------------- prim_expr prim_expr ... prim_expr prim_expr: ---------- nonident_prim_expr identifier_prim prim_expr :: prim_expr nonident_prim_expr: ------------------- $ prim_expr nonident_prim_expr . identifier nonident_prim_expr . size nonident_prim_expr [ expr ] string integer float ( number number number ) game level local parm self group ( expr ) - nonident_prim_expr ~ nonident_prim_expr ! nonident_prim_expr NULL NIL number: ------- float integer Automatically started scripts ============================= 1) maps/mapname.scr A level script is associated with each map, and is loaded and started at the start of that map (and not for subsequent starts from a saved game). This script is used for triggering all map related dynamic objects such as doors, elevators, AI, etc. maps/mapname.scr corresponds to maps/mapname.bsp. A level script is optional. 2) maps/mapname_precache.scr A level precache script is associated with each map, and is loaded and started whenever the map is loaded (even from a saved game). This script is used for precaching map specific resources. maps/mapname_precache.scr corresponds to maps/mapname.bsp. A level precache script is optional. 3) Scripts in the anim directory are executed to carry out animation behavior of AI characters. Which script is executed is determined by internal AI state or scripts such as global/shoot.scr. Threads ======= A thread executes commands in a script one at a time in order. Multiple threads can exist. The automatically started scripts start execution with a single thread at the start of the file. All threads belong to a group of threads, denoted "group". The current thread is denoted "local". The group of threads that a thread belongs to will be discussed in the next section. Methods of creation of threads ------------------------------ 1) Automatic The new thread initially is the only thread in its group. 2) Command: thread label The new thread belongs to the same group of threads as the original thread. 3) Command: thread filename::label The new thread initially is the only thread in its group. 4) Command: object thread label The new thread initially is the only thread in its group. 5) Command: object thread filename::label The new thread initially is the only thread in its group. Predefined object references ============================ 1) game Refers to the unique game object which maintains its state across levels. Only primitive values (integers/floats/strings/vectors) will persist across levels. 2) level Refers to the unique level object which maintains its state for the duration of a level. 3) local Refers to the thread executing the current command. 4) parm Refers to the unique parm object which can be used to pass parameters to new threads. Note that any use of this variable could be coded "better" by using parameters in the creation of new threads. 5) self Refers to the object that the thread is processing for. This object is the same for all threads in a group of threads. 6) group Refers to the object representing the group of threads the thread executing the current command belongs to. self object =========== The "self" object has its value set at the creation of a group of threads. The following are some such situations: 1) Automatically started scripts self is NULL for level scripts. self is the character for animation scripts. 2) Command: thread label Since the new thread has the same group as the original thread, self in the new thread is equal to self in the original thread. 3) Command: thread filename::label self in the new thread is set equal to self in the original thread. 4) Command: object thread label self in the new thread is set equal to object. 5) Command: object thread filename::label self in the new thread is set equal to object. 6) If a thread is initiated in response to an event of an object, then self is set equal to this object. switch (selection) statement ============================ Standard usage -------------- switch (expr) { label1: statement ... statement break label2: statement ... statement break case 0: statement ... statement break case 1: statement ... statement break default: statement ... statement break } The expression expr is evaluated and cast to a string. Code execution tranfers to the matching label or to the optional default label if there is no match. The case prefix is required for integers, and optional for strings. The break command makes the switch statement finish. if (conditional) statement ========================== Standard usage -------------- if (expr) statement if (expr) statement else statement if (expr) { statement ... statement } if (expr) { statement ... statement } else { statement ... statement } arithmetic binary operators =========================== precedence ---------- The operators are listed in order of later evaluation to sooner evaluation: || && | ^ & == != = + - * / % descriptions ------------ || logical or (outputs 0 or 1) && logical and (outputs 0 or 1) | bitwise or (outputs integer) ^ bitwise exclusive or (outputs integer) & bitwise and (outputs integer) == equality (outputs 0 or 1) != inequality (outputs 0 or 1) > gretaer than (outputs 0 or 1) >= greater than or equal (outputs 0 or 1) + plus (numeric or string types) - minus * multiply / divide % modulus (remainder after division by integer) while statement =============== Standard usage -------------- while (expr) statement while (expr) { statement ... statement } At the start of a cycle of the loop the expression expr is evaluated and cast to boolean (true or false). While the expression evaluates to true the statement(s) are executed. A continue placed inside such a loop will move the code execution point to the end of the current cycle of the loop. A break placed inside such a loop will terminate execution of the loop (code execution will continue sfter the loop). Example ------- local.n = 1 while (local.n ::c println local.a[1][1] // prints a println local.a[1][2] // prints b println local.a[2] // prints c Vector Examples --------------- Vectors are accessed like arrays in the indices 0, 1, 2. A vector could be set like local.my_vector = (10 -2 60.1) Then this vector could be accessed like: println local.n[2] which would print 60.1 to the console. Example ------- $player.origin += (5 6 7) // offset the player's origin by (5 6 7). Make Array Example ------------------ local.Path1 = makeArray t1 300 10 200 t2 t3 t4 t5 t6 t7 NIL 10 200 t8 t9 t10 t11 t12 t13 t14 0 10 200 endArray println local.Path1[1][2] println local.Path1[1][3] println local.Path1[1][4] println local.Path1[1][5] println local.Path1[14][1] println local.Path1[15][1] end results in: 300 10 200 NIL t14 NIL printed to console. Automatic casting ================= If a parameter in a statement is required to be of some type, then an automatic cast will be attempted. Accessing characters of a string ================================ Characters of a string are accessed by the [] array operator. Indexing starts at 0. For example, "abc"[2] evaluates to the string "c". There is no character type, so characters are just strings of length 1.
-
In Game Surface Types Note: The in game surface types are not the same as the search keywords material types. The surface type for a shader is specified via a "surfaceparm type" line, where type is the surface type to use. Example: surfaceparm wood Note that only one surface type can be used at a time, and so only one should be specified in a shader. Here's a list of each of the surface types that can be specified: wood - wooden surface metal - metal surface (like metal plating) stone - stone or rock surface dirt - dirt surface grill - metal grill surface grass - grass covered surface mud - muddy or squishy sounding surface puddle - water puddle surface glass - glass surface gravel - rocky gravel surface sand - sandy surface foliage - tree tops, bushes, or leaf covered surface snow - snow covered surface carpet - carpeted surface
-
Usage of texture: wall - vertical wall textures, natural or man-made floor - floor textures, either natural(ground) or man-made ceiling - anything that was made to be used as a ceiling roof - rooftop textures for buildings door - any door texture, including gates window - any window texture, including the window frames sky - sky's....DUHHHHHH ;)p signs - anything that has verbage on it, posters, signs road - road, paths and trails pipe - pipe textures, valves for pipes, also includes wires flat - anything that produces an even, non-bordered pattern in all directions special - made for brush objects ONLY (i.e. crates, boxcars) indoor - pictures, misc household items trim - all trim, including ibeams, endcaps, etc... masked - any texture that has alpha'd areas (like handrails, grates, etc...) damaged - anything that's been damaged (has blast marks, burns, etc...) utility - textures like nodraw, caulk, trigger, etc.... ONLY! terrain - only put this on textures made specifically for the terrain system panel - paneled type textures (like the library ones) light - light emmiting textures Material types: metal - all types of metal rusted - rusted, weathered metal corrugated - corrugated materials gravel - gravel textures sand - sand textures rock - naturally occuring rock formations (walls, floors, etc...) stone - man-altered rocks like stone walls, cobblestone streets, also tile brick - brick textures concrete - concrete textures wood - wood textured plaster - plaster textures carpet - carpet and cloth type textures liquid - all liquids, including oceans, rivers, puddles, etc.... river - river textures, or other flowing water types ocean - ocean textures glass - glass textures tudor - used in french/german towns with plaster sandwiched between wooden beams natural - non man-made materials dirt - all dirt textures, including transitional textures with dirt grass - all grass texture, including transitional textures with grass tree - textures relating to trees bush - textures relating to bushes folliage - vines, forest canopy, underbrush snow - if the texture has any snow or ice on it mud - if the texture is, or has mud on it Level Reference: - meaning the texture was made for a particular mission m1 - North Africa m2 - D-Day, Normandy, Nebelwerfer m3 - OSS mission in France, blow train rails, manor house m4 - Brest France, Artillery missions, sniper hunt m5 - snow forrest, snow town/train station, schmertzen m6 - Hunt artillery, Ramagen m7 - U-Boats in Norway intro - opening cinematic ending - ending cinematic
-
第二个问题其实有一个movespeed,在武器.tik里。不过以服务器端文件为主。