Difference between revisions of "CEM3: Custom Speed Coefficients"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		Default: 
Example 4: 
| (3 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
| <dt>Description:</dt> | <dt>Description:</dt> | ||
| <dd>As of v0.1.4 it is possible for mission / addon makers to modify the speed coefficients.</dd> | <dd>As of v0.1.4 it is possible for mission / addon makers to modify the speed coefficients.</dd> | ||
| {{CMF Feature|IMPORTANT|  | {{CMF Feature|IMPORTANT| '''cem_movement_speeds''' must have exactly 8 speeds (Sub-Arrays).}} | ||
| <dt>Locality:</dt> | <dt>Locality:</dt> | ||
| <dd>Local  | <dd>Local Argument, Local Effect</dd> | ||
| </dl> | </dl> | ||
| Line 21: | Line 21: | ||
| <dd>animation: [https://community.bistudio.com/wiki/String String] - The animation to use, currently only '''"WALK"''' and '''"JOG"''' are supported</dd> | <dd>animation: [https://community.bistudio.com/wiki/String String] - The animation to use, currently only '''"WALK"''' and '''"JOG"''' are supported</dd> | ||
| <dt></dt><dd>speedCoef: [https://community.bistudio.com/wiki/Number Number] - The animation speed coefficient, 1 is normal speed.</dd> | <dt></dt><dd>speedCoef: [https://community.bistudio.com/wiki/Number Number] - The animation speed coefficient, 1 is normal speed, 2 is double, etc.</dd> | ||
| </dl> | </dl> | ||
Latest revision as of 00:05, 10 May 2023
Description
- Description:
- As of v0.1.4 it is possible for mission / addon makers to modify the speed coefficients.
- Locality:
- Local Argument, Local Effect
Syntax
- Syntax:
- cem_movement_speeds = [[animation, speedCoef], ...]
- Parameters:
- animation: String - The animation to use, currently only "WALK" and "JOG" are supported
- speedCoef: Number - The animation speed coefficient, 1 is normal speed, 2 is double, etc.
[["WALK", 0.5], ["WALK", 0.7], ["WALK", 1], ["WALK", 1.2], ["WALK", 1.5], ["WALK", 1.8], ["JOG", 0.9], ["JOG", 1]];
Examples
- Example 1:
- // Sets speeds locally for player cem_movement_speeds = [["WALK", 0.3], ["WALK", 0.5], ["WALK", 0.8], ["WALK", 1], ["WALK", 1.3], ["WALK", 2], ["JOG", 0.5], ["JOG", 1.5]]; 
- Example 2:
- // Sets speeds for all players cem_movement_speeds = [["WALK", 0.3], ["WALK", 0.5], ["WALK", 0.8], ["WALK", 1], ["WALK", 1.3], ["WALK", 2], ["JOG", 0.5], ["JOG", 1.5]]; publicVariable "cem_movement_speeds"; 
// Sets speeds target player
[[],{cem_movement_speeds = [["WALK", 0.3], ["WALK", 0.5], ["WALK", 0.8], ["WALK", 1], ["WALK", 1.3], ["WALK", 2], ["JOG", 0.5], ["JOG", 1.5]]}] remoteExec ["call", _target]