onMapSingleClick: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
back to [[Scripting_Reference#O|COMREF]]
<h2 style="color:#000066">'''onMapSingleClick ''command'''''</h2>
<h2 style="color:#000066">'''onMapSingleClick ''command'''''</h2>


'''Operand types:'''
'''Operand types:'''


command: [[String]]
'''command:''' [[String]]


'''Type of returned value:'''
'''Type of returned value:'''


Nothing
[[Nothing]]


'''Description:'''
'''Description:'''


Define action performed when user clicks in map.
Define action performed when user clicks in map.
Command receives:
Command receives:


Line 18: Line 22:
* _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]].
 


'''Examples:'''
'''Examples:'''


'''onMapSingleClick''' {"SoldierWB" createUnit [_pos, group player]; true}
'''onMapSingleClick''' {"SoldierWB" [[createUnit]] [_pos, [[group]] [[player]]]; [[true]]}
 
'''onMapSingleClick''' {grp1 move _pos; leader grp1 sidechat "Moving"; variable1 = true;
 
'''onMapSingleClick''' {}}


'''Comments'''
'''onMapSingleClick''' {grp1 [[move]] _pos; [[leader]] grp1 [[sidechat]] "Moving"; variable1 = [[true]]; '''onMapSingleClick''' {}}

Revision as of 19:54, 15 April 2006

back to COMREF

onMapSingleClick command


Operand types:

command: String

Type of returned value:

Nothing

Description:

Define action performed when user clicks in map.

Command receives:

If click is processed, command should return true.


Examples:

onMapSingleClick {"SoldierWB" createUnit [_pos, group player]; true}

onMapSingleClick {grp1 move _pos; leader grp1 sidechat "Moving"; variable1 = true; onMapSingleClick {}}