Editing Script Repository

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 279: Line 279:
  
 
ScenEdit_SetSpecialAction({ActionNameOrId='Instant Aircraft Ready Special Event', IsActive=false})
 
ScenEdit_SetSpecialAction({ActionNameOrId='Instant Aircraft Ready Special Event', IsActive=false})
 
</syntaxhighlight>
 
 
===Make Units Non-Detectable===
 
 
[https://www.matrixgames.com/forums/tm.asp?m=4804451 This uses Apache85's GenerateListofUnitsOnSide function.]
 
 
<syntaxhighlight lang="lua" line='line'>
 
local OPFOR = GenerateListOfUnitsOnSide("OPFOR")
 
 
 
for k,v in ipairs(OPFOR) do
 
    local unit = ScenEdit_GetUnit({guid=v.guid})
 
--print(unit.type)
 
    if unit.type == "Facility" then
 
unit.autodetectable=false
 
print("The unit "..unit.name.." is now not detectable.")
 
end
 
end
 
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Please note that all contributions to Weapons Release Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Weapons Release Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)