FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    1. Home
    2. Mavr390
    3. Best
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: stand-up animation like the GC

      Change AnimationActivate to AnimationPermOpen

      posted in Modding & Tools
      M
      Mavr390
    • RE: Check for Specific Mods Loaded

      @rama Quite a long time ago I found (in one of the mods) a modlocator.

      local MODfound = 'nottrue'
      
      function MODisactive()
      	if MODfound == 'nottrue' then
      		MODfound = GetActiveModLocation("Your mod ID")
      	end
      	return MODfound
      end
      
      function GetActiveModLocation( mod_Id )
          for i, mod in __active_mods do
      	if  mod_Id == mod.uid then
      	    LOG("MANIMAL\'s MOD LOCATOR INFO:  Active Mod Found (name="..(mod.name or 'unknown')..", UID="..(mod.uid or 'none')..", location = "..mod.location..")  .")
      	    return mod.location
          	end
          end
          return nil
      end
      

      I always keep this file in the root folder of the mod.
      It gives variety. If the mod is enabled, then one action occurs, and if it is disabled, then another.
      In *script.lua it looks like this:

      local MODISACTIVE = import('/mods/Your mod name/modlocator.lua').MODisactive()
      
          OnStopBeingBuilt = function(self,builder,layer)
      	if MODISACTIVE then
      
      	else
      
      	end
      	Unit.OnStopBeingBuilt(self,builder,layer)
          end,
      

      Try. This modlocator helps me out.

      posted in Modding & Tools
      M
      Mavr390