KnightHawk75
Posts: 786
Joined: 11/15/2018 Status: offline
|
v1.03 Upload loadup: Lua script execution error: [string "scenario start- update magazines"]:21: attempt to call a nil value (global 'ScenEdit_ClearMagazine' ) Check LuaAction: "Scenario start-update magazines-axis" The CV Type 002 line should likely be ScenEdit_ClearAllMagazines. Still looking around, but I like attempts at making it dynamic (some loadout choice pkg, hit X enemy could loses Y,dmg=% of lost comms,etc). Good stuff, suggest clearing the log before release too, easy to forget. edit: activate-recon UAV Ford - Event has no associated Action, this may be getting assigned\re-assigned later but having it empty initially causes a gui lock (can't close screen) without putting something in there (I put the action "activate-recon UAV Ford" in there). "activate-strike ASBM alpha" event has two time triggers, one random, one specific. The specific one is set for 10-10-2025 ~two weeks before the scene (which the Scene Description says is dec 1,2025 btw not September). edit2: In the set-reference point script actions, while it may not ultimately matter (ie probably work as they are) the following vars should all be prefaced with "local", otherwise you're setting these globally each time and I'm pretty sure that's not what is intended. minVarlat=-15
maxVarlat=15
varlat=math.random(minVarlat, maxVarlat)/10
minVarlon=-10
maxVarlon=10
varlon=math.random(minVarlon, maxVarlon)/10 Course you could also just wrap all that into one global function at startup to reuse.
-- included in a startup script that runs before anything else--
function gGetLatLonVariation(min1,max1,min2,max2)
math.randomseed(os.clock() + os.time());
local varlat = math.random(min1, max1)/10;
local varlon = math.random(min2, max2)/10;
return varlat,varlon;
end
--
--replacement line in set reference point scripts. avoiding duplicate code.
local varlat,varlon = gGetLatLonVariation(-15,15,-10,10)
--print(varlat ..' , '.. varlon);
< Message edited by KnightHawk75 -- 10/7/2020 2:59:24 PM >
|