Scripting Commands – Category talk

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "<code>" to "<code style="display: block">")
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
It seems that the list of Subcategories has moved to page 2 of Category Scripting Commands.
== Examples ==


Also the list of commands are not all in strict alphabetical order.....strange.
When adding an example code in the command template prefix the example with |x1 '''=''' (example. Be sure to wrap the example with <nowiki> <code style="display: block"></code> </nowiki>. If your example contains a '''=''' then it may not display properly. You have to use the <nowiki><nowiki></nowiki></nowiki> tags around the '''=''' equal sign. Also note that double <nowiki>{{}}</nowiki> in command examples may also break the template.
 
[[User:Planck|Planck]] 12:05, 25 April 2006 (CEST)
 
-----
 
The list of Subcategories has moved to page 3 of Category Scripting Commands.
 
[[User:Planck|Planck]] 13:23, 3 May 2006 (CEST)
 
-----
[[User:Hlavac|Hlavac:]] I've fixed subcategories list position by disabling paging for categories.
-----
[[User:Hlavac|Hlavac:]] The sorting issue is caused by people using just first letter as category sort key -
that causes most pages to be in random order because they have all the same sort key.
To fix this they should not use the sort key at all or use whole command name in uppercase as a sort key.
-----
 
OK, thanks I think I have it, might take a while to change, but we'll get there.
 
[[User:Planck|Planck]] 13:21, 4 May 2006 (CEST)
 
-----
 
OK, All done.
 
[[User:Planck|Planck]] 18:21, 4 May 2006 (CEST)
 
== Infobox? ==
 
This maybe a good time to add infoboxes for scripting commands. I am now learning symtax, so if you have any idea, post it here. --[[User:Djura|Djura]] 12:35, 22 July 2006 (CEST)
 
: The locality of the command in MP should be mentioned. --[[User:T D|T_D]] 12:49, 22 July 2006 (CEST)
 
: What do you think about this idea --[[User:Djura|Djura]] 13:53, 22 July 2006 (CEST) {{Infobox scripting command}}
 
: It's a beginning, you could add (as mentioned) the locality of the command and an example box --[[User:T D|T_D]] 13:57, 22 July 2006 (CEST)
 
:: My idea is let example, (with example script witch shows command 'in the action') and description out of infobox.
 
-----
 
Ok, I have to ask.....what is ''_x'' and ''this''  doing among the scripting commands.
 
My understanding is that _x is a special local variable and this can be either a variable or an array.
 
[[User:Planck|Planck]] 20:27, 30 July 2006 (CEST)
 
: Depends on... ;) Well, _x can either be a "normal" defined local variable, but experienced scripters don't use _x as normal variable, as it is reserved in forEach and count. Example: {_x setDamage 1} forEach [Planck, raedor]. The forEach command will execute the line in {} once with each of the elements of the array. ''this'' is used in config defined action menu's conditions and in initlines (with this as the object you're creating; that also goes for createUnit). Then you have _this, which contains the arguments with which the script was opened. Eg: raedor exec "script.sqs", then _this would be raedor in the script. Also see [[this]] and [[x]]. --[[User:Raedor|raedor]] 20:33, 30 July 2006 (CEST)
 
:LOL, looks like I pretty much misunderstood your question. They have to do nothing there imho. --[[User:Raedor|raedor]] 20:39, 30 July 2006 (CEST)

Latest revision as of 12:53, 11 January 2023

Examples

When adding an example code in the command template prefix the example with |x1 = (example. Be sure to wrap the example with <code style="display: block"></code> . If your example contains a = then it may not display properly. You have to use the <nowiki></nowiki> tags around the = equal sign. Also note that double {{}} in command examples may also break the template.