scudState: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added note about "action" only working with units w/driver.)
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(66 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.30


|1.30|= Game version
|game2= ofpe
____________________________________________________________________________________________
|version2= 1.00


| Current state of given Scud launcher. Following states are recognized:
|game3= arma1
|version3= 1.00


*0 - No activity 
|game4= arma2
*1 - Launch preparation,
|version4= 1.00
*2 - Launch prepared
*3 - Ignition 
*4 - Launched.
|= Description
____________________________________________________________________________________________


| [[Number]] <nowiki>=</nowiki>  '''scudState''' scudName |= Syntax
|game5= arma2oa
|version5= 1.50


|p1= scudName: [[Object]] |= Parameter 1
|game6= tkoh
|version6= 1.00


| [[Number]] |= Return value
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50
 
|x1= <pre>? scudState _scudOne >= 3 : hint "RUN!!!!"</pre> |= Example 1
____________________________________________________________________________________________


| |= See also
|gr1= Object Manipulation


}}
|descr= Return the current state of given Scud launcher.


<h3 style="display:none">Notes</h3>
|s1= [[scudState]] scudName
<dl class="command_description">
<!-- Note Section BEGIN -->
Non-integral values are used to indicate transition between states.
<dd class="notedate">Posted on August 4, 2006 - 10:58</dd>
<dt class="note">'''[[User:Hardrock|hardrock]]'''</dt><dd class="note">''Notes from before the conversion:''


This command does not make the scud do anything.
|p1= scudName: [[Object]]


It simply checks to see what state the scud is in.
|r1= [[Number]] - can be one of:
* 0 - No activity
* 1 - Launch preparation
* 2 - Launch prepared
* 3 - Ignition
* 4 - Launched


To make the scud be upright or launch you need to use an action.
|x1= <sqf>
waitUntil { sleep 1; scudState _scud > 2 };
guba say "MasterPlanCompletion";
</sqf>


e.g. scud1 [[action]] ["scud launch"]
|seealso= [[action]] [[Arma 3: Actions#ScudStart|"ScudStart" action]] [[Arma 3: Actions#ScudLaunch|"ScudLaunch" action]]
}}


*Note that "action" only works for units with a driver.  Running this on an empty scud launcher will not work. -'''[[User:firefly2442|firefly2442]]'''
<dl class="command_description">
</dd>


<!-- Note Section END -->
<dt></dt>
<dd class="notedate">Posted on 2006-08-04 - 10:58</dd>
<dt class="note">[[User:Hardrock|hardrock]]</dt>
<dd class="note">
This command checks the scud status (Non-integral values are used to indicate transition between states).
To make the scud be upright, launch or cancel launch you need to use actions.
<sqf>
scud1 action ["scudLaunch", scud1]; // rise the missile
scud1 action ["scudStart", scud1]; // launch the missile
scud1 action ["scudCancel", scud1]; // down the missile
</sqf>
(Make sure either the scud launcher has a crew inside or you use the game logic to perform actions).
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SCUDSTATE]]
[[Category:Scripting Commands OFP 1.96|SCUDSTATE]]
[[Category:Scripting Commands OFP 1.46|SCUDSTATE]]
[[Category:Scripting Commands ArmA|SCUDSTATE]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 19:43, 3 September 2024

Hover & click on the images for description

Description

Description:
Return the current state of given Scud launcher.
Groups:
Object Manipulation

Syntax

Syntax:
scudState scudName
Parameters:
scudName: Object
Return Value:
Number - can be one of:
  • 0 - No activity
  • 1 - Launch preparation
  • 2 - Launch prepared
  • 3 - Ignition
  • 4 - Launched

Examples

Example 1:
waitUntil { sleep 1; scudState _scud > 2 }; guba say "MasterPlanCompletion";

Additional Information

See also:
action "ScudStart" action "ScudLaunch" action

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
Posted on 2006-08-04 - 10:58
hardrock
This command checks the scud status (Non-integral values are used to indicate transition between states). To make the scud be upright, launch or cancel launch you need to use actions.
scud1 action ["scudLaunch", scud1]; // rise the missile scud1 action ["scudStart", scud1]; // launch the missile scud1 action ["scudCancel", scud1]; // down the missile
(Make sure either the scud launcher has a crew inside or you use the game logic to perform actions).