onMapSingleClick – Talk
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
[[User:Planck|Planck]] 11:53, 9 July 2007 (CEST) | [[User:Planck|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]"; | onMapSingleClick """SoldierWB"" createUnit [_pos, group player]"; | ||
Line 22: | Line 22: | ||
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. | 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. | I am used to functions returning values. Not commands returning values. --[[User:ViperMaul|ViperMaul]] 05:34, 10 July 2007 (CEST) |
Revision as of 04:34, 10 July 2007
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)