Difference between revisions of "onMapSingleClick"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
m (Fixed notes, examples, desc)
Line 2: Line 2:
 
[[Category:Scripting Commands OFP 1.96|ONMAPSINGLECLICK]]
 
[[Category:Scripting Commands OFP 1.96|ONMAPSINGLECLICK]]
 
[[Category:Scripting Commands ArmA|ONMAPSINGLECLICK]]
 
[[Category:Scripting Commands ArmA|ONMAPSINGLECLICK]]
 +
{{Command|= Comments
 +
____________________________________________________________________________________________
  
 +
| ofpr |= Game name
  
<h2 style="color:#000066">'''onMapSingleClick ''command'''''</h2>
+
|1.85|= Game version
 +
____________________________________________________________________________________________
  
 
+
| Define action performed when user clicks in map.  
'''Operand types:'''
 
 
 
'''command:''' [[String]]
 
 
 
'''Type of returned value:'''
 
 
 
[[Nothing]]
 
 
 
'''Compatibility:'''
 
 
 
Added in version '''1.85'''
 
 
 
'''Description:'''
 
 
 
Define action performed when user clicks in map.
 
  
 
Command receives:
 
Command receives:
Line 29: Line 18:
 
* _shift, _alt [[Boolean]] key state
 
* _shift, _alt [[Boolean]] key state
  
If click is processed, command should return [[true]].
+
If click is processed, command should return [[true]]. |=
 +
____________________________________________________________________________________________
 +
 
 +
| '''onMapSingleClick''' command |= Syntax
 +
 
 +
|p1= command: [[String]] |= Parameter 1
 +
 
 +
| [[Nothing]] |= Return value
 +
____________________________________________________________________________________________
 +
| x1 = <code>onMapSingleClick {"SoldierWB" [[createUnit]] [_pos, [[group]] [[player]]]; [[true]]}</code> |= Example 1
  
 +
| x2 = <code>onMapSingleClick {grp1 [[move]] _pos; [[leader]] grp1 [[sideChat]] "Moving"; variable1 <nowiki>=</nowiki> [[true]]; onMapSingleClick <nowiki>{}}</nowiki></code> | = Example 2
 +
|  |= See also
  
'''Examples:'''
+
}}
  
'''onMapSingleClick''' {"SoldierWB" [[createUnit]] [_pos, [[group]] [[player]]]; [[true]]}
+
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
  
'''onMapSingleClick''' {grp1 [[move]] _pos; [[leader grp|leader]] grp1 [[sideChat]] "Moving"; variable1 = [[true]]; '''onMapSingleClick''' {}}
+
<!-- Note Section END -->
 +
</dl>

Revision as of 01:13, 4 August 2006

Introduced with Operation Flashpoint: Resistance version 1.851.85
Hover & click on the images for descriptions

Description

Description:
Define action performed when user clicks in map. Command receives: If click is processed, command should return true.

Syntax

Syntax:
onMapSingleClick command
Parameters:
command: String
Return Value:
Nothing

Examples

Example 1:
onMapSingleClick {"SoldierWB" createUnit [_pos, group player]; true}
Example 2:
onMapSingleClick {grp1 move _pos; leader grp1 sideChat "Moving"; variable1 = true; onMapSingleClick {}}

Additional Information

See also:
See also needed

Notes

i
Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.

Notes