Jump to content

Lua Scripting .. how to get the object category


Surrexen

Recommended Posts

I'm trying to write a function that checks whether or not a group is a static object or not and I'm not sure how to do it.

 

So far I can get this to work:

 

local PrimaryGroup = Group.getByName("Objective " .. ScenarioNumber .. " Primary"):getCategory()

 

But that gets the group category and not the object category. I'm not sure how to get object.getCategory to work :doh:

 

Anyone done this that can help me out?

 

 

Edit: Nevermind, got it.

 

local StaticGroupTestPrimary = StaticObject.getByName("Objective " .. ScenarioNumber .. " Primary"):getCategory()


Edited by Surrexen
Solved
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...