onMapSingleClick – Talk

From Bohemia Interactive Community
Revision as of 04:34, 10 July 2007 by Vipermaul (talk | contribs)
Jump to navigation Jump to search

Note: This expects a bool return value, unlike onPlayerConnected. --Doolittle 07:33, 9 July 2007 (CEST)

Much appreciated. Please give an example. Thanks --ViperMaul 11:40, 9 July 2007 (CEST)

Command description text already states this.

If click is processed, command should return true.

Planck 11:53, 9 July 2007 (CEST)

Correct me if I am wrong here. But technically speaking the term "command" in "If click is processed, command should return true" when applied to the following example given onMapSingleClick """SoldierWB"" createUnit [_pos, group player]";

in this statement the command == """SoldierWB"" createUnit [_pos, group player]" right? And if command returns true then this example evaluates to onMapSingleClick true; This is judging by the read.

Is it not a better example to say _result = onMapSingleClick """SoldierWB"" createUnit [_pos, group player]"; where _result can equal true or false? Again if I am off the mark then I am confused and I am asking for a concrete example to clear this up for me and probably others.

I am used to functions returning values. Not commands returning values. --ViperMaul 05:34, 10 July 2007 (CEST)