ala15v / deust

DCS Editor Utilities and Scripting Tools
https://doc.ala15v.com
Apache License 2.0
2 stars 0 forks source link

feature: Allow customize global variables #12

Open mac-developer opened 1 year ago

mac-developer commented 1 year ago

Idea!

Customize global variables using a Trigger Zone on Mission Editor with properties.

What do you think about that @alexsm32 ?

alexsm32 commented 1 year ago

@mac-developer can you add one example? This idea can be interpreted in many different ways.

alexsm32 commented 1 year ago

When I was using ops zones in combination with the ops chief, the way that I found to automate the prioriti and importance of the zone was addings those parameters in the zone name.

for _, zone in pairs(DBborderStrategicZones:GetSet()) do
        local zoneName = zone:GetName()
        local splitName = {}
        for str in string.gmatch(zoneName, "%S+") do
            table.insert(splitName, str)
        end
        local priotity = tonumber(splitName[2])
        local importance = tonumber(splitName[3])
        local StrategicZone = OPSZONE:New(zoneName)

        ------- Omitted Code-------
        Chief:AddStrategicZone(StrategicZone, priotity, importance, ResourceListOccupied, ResourceListEmpty)
end

Do you mean something like this?

mac-developer commented 1 year ago

I'm talking about to set properties on Trigger Zone. You can check from mission editor. When you open trigger zone, you'll see a table format on left side..

alexsm32 commented 1 year ago

Ouu I never saw that. It looks promising. And how can you use those properties in code??