Jump to content

Recommended Posts

Posted

Anything stored within the mission is accessible. Drawings are in env.mission.drawings You can iterate the tables via to access them. 

        if env.mission.drawings and env.mission.drawings.layers then
            for i = 1, #env.mission.drawings.layers do
                local l = env.mission.drawings.layers[i]
                for j = 1, #l.objects do
      				-- some drawing
                end
            end
         end

   Note that the data format is a little different than how you might draw that same thing via the scripting engine and the features of both are different overall. 

  • Thanks 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 3 months later...
Posted
On 10/7/2022 at 12:18 AM, Grimes said:

Anything stored within the mission is accessible

If that's true then how do I get to the images inside 'pictureFileNameB' table? Because they're obfuscated with a ResKey.

Posted
9 hours ago, Elphaba said:

If that's true then how do I get to the images inside 'pictureFileNameB' table? Because they're obfuscated with a ResKey.

Via scripting I suppose you don't. Though if you know the filenames like with audio then you can hardcode it into some script because they will always be in the l10n\default folder. For example with this I knew the audio files for use with a speech construction script. 

	local sFiles = {}
	-- Tusk
	sFiles[#sFiles + 1] = {file = 'tusk_complete.wav', len = 0.6, text = 'complete', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_out.wav', len = 0.9, text = 'out', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_Over.wav', len = 1.5, text = 'over', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_requestPicture.wav', len = 1.2, text = 'request picture', voice = 'tusk'} 

 

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
5 hours ago, Grimes said:

Via scripting I suppose you don't. Though if you know the filenames like with audio then you can hardcode it into some script because they will always be in the l10n\default folder. For example with this I knew the audio files for use with a speech construction script. 

	local sFiles = {}
	-- Tusk
	sFiles[#sFiles + 1] = {file = 'tusk_complete.wav', len = 0.6, text = 'complete', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_out.wav', len = 0.9, text = 'out', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_Over.wav', len = 1.5, text = 'over', voice = 'tusk'}
	sFiles[#sFiles + 1] = {file = 'tusk_requestPicture.wav', len = 1.2, text = 'request picture', voice = 'tusk'} 

 

Yeah, knowing them up front is fine if *I* made the mission, but if I didn’t then there’s a problem. it’s surely a bug that they aren’t exposed in script - especially as the key is exposed in env.mission. 

  • 1 year later...
  • Recently Browsing   0 members

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