limitSpeed: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (example format & note formate)
Line 19: Line 19:
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <pre>// Adjust "speedLimit" variable to change limited speed
|x1= <code>// Adjust "speedLimit" variable to change limited speed. (A3 1.24 we don't need loop for a continus effect, [[limitSpeed]] alone is enough.)
this setVariable ["speedLimit", 200];
_this [[setVariable]] ["speedLimit", 200];
nul = this spawn {
_nul = _this [[spawn]] {
while {canMove _this} do {
[[while]] {[[canMove]] _this} [[do]] {
_this limitSpeed (_this getVariable "speedLimit");
_this [[limitSpeed]] (_this [[getVariable]] "speedLimit");
sleep 0.1;
[[sleep]] 0.1;
};
};
};</pre> |= Example 1
};</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 36: Line 36:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 9 February 2008
<dt class="note>'''[[User:Kronzky|Kronzky]]'''
<dd class="note">(A1 1.08.5163)Has only an ''temporary'' effect on the vehicle specified (i.e. vehicle goes back to its previous speed right away). So, in order for this command to have a ''real'', noticeable effect, it would have to be issued continuously (e.g. via a script loop, but in A3 1.24 it's unnecessary).


<dd class="notedate">Posted on 28 July 2013
<dd class="notedate">Posted on 28 July 2013
<dt class="note>'''[[User:Will|Will]]'''
<dt class="note>'''[[User:Will|Will]]'''
<dd class="note">This command has no effect (doesnt do anything) in Arma3 (V1.24) - Reported to BI: http://feedback.arma3.com/view.php?id=19974
<dd class="note">This command has no effect (doesnt do anything) in Arma3 (V1.24) - Reported to BI: http://feedback.arma3.com/view.php?id=19974
<dd class="notedate">Posted on 9 February 2008
<dt class="note>'''[[User:Kronzky|Kronzky]]'''
<dd class="note">Has only an ''temporary'' effect on the vehicle specified (i.e. vehicle goes back to its previous speed right away). So, in order for this command to have a ''real'', noticeable effect, it would have to be issued continuously (e.g. via a script loop). (V1.08.5163)
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>

Revision as of 05:18, 29 July 2014

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

Description:
Limit speed of given vehicle or person to given value (in km/h).
Groups:
Uncategorised

Syntax

Syntax:
objectName limitSpeed speed
Parameters:
objectName: Object
speed: Number
Return Value:
Nothing

Examples

Example 1:
// Adjust "speedLimit" variable to change limited speed. (A3 1.24 we don't need loop for a continus effect, limitSpeed alone is enough.) _this setVariable ["speedLimit", 200]; _nul = _this spawn { while {canMove _this} do { _this limitSpeed (_this getVariable "speedLimit"); sleep 0.1; }; };

Additional Information

See also:
speed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Posted on 9 February 2008
Kronzky
(A1 1.08.5163)Has only an temporary effect on the vehicle specified (i.e. vehicle goes back to its previous speed right away). So, in order for this command to have a real, noticeable effect, it would have to be issued continuously (e.g. via a script loop, but in A3 1.24 it's unnecessary).
Posted on 28 July 2013
Will
This command has no effect (doesnt do anything) in Arma3 (V1.24) - Reported to BI: http://feedback.arma3.com/view.php?id=19974

Bottom Section