SRTT Lua functions

Hi,

Is there a way to call functions from other lua scripts or make function overrides when in a lua script that does not have those functions?
 
You should be able to call functions across any lua scripts that are loaded. game_lib.lua is always loaded - that is where we have most shared code for missions.

Loading additional lua scripts may be possible, but I would need to investigate.
 
Speaking of LUA, we've came across certain functions that refused to work outisde their respective mission scripts. For example:
Code:
m16_vfx_spawn = "Vfx Cyberspace Spawn"
 
effect_play_on_human(m16_vfx_spawn, LOCAL_PLAYER)
worked like a charm in Deckers.die mission but calling this function during open world gameplay returned nothing. May I ask what's causing that?
 
Streaming. The effect is loaded with the mission and not loaded elsewhere. The function is working, it just can't find the effect to play since it isn't loaded.
 
Thanks for the reply! Is there maybe a way to recognize which file "contains" the effect defined as "Vfx Cyberspace spawn" then? We couldn't find it in effects.xtbl (stored inside misc_tables.vpp_pc), since the only effect coming close to the one mentioned in mission script was "VFX_CyberSpace_Spawn" (with underscores). However, executing this:

effect_play_on_human( "VFX_CyberSpace_Spawn", LOCAL_PLAYER)

returned nothing as well.
 
The problem is not where the information that describes the effect lives (which is in effects.xtbl, although I don't know what's going on with the underscore difference), but where the visual data for the effect is. Effects that are mission-specific are usually stored with the mission so they don't take up memory during the rest of the game.

This post (and the thread, really, since this is mission-only content) are relevant:
http://www.saintsrowmods.com/forum/...content-in-freeroam-gameplay.2575/#post-21071
 
The effect would live in the str2 file of the mission. An effect has a name in the effects.xtbl file and potentially a different name in the visual effect table file(vfx.xtbl?) for the visual part of it(which is the actual file that is placed in the mission container which is written to the str2 file).
 
thanks for the replies, however when I was talking about calling fuctions from a lua script in one that doesn't have them, to be more specific, I was talking about calling functions from other store lua script in store_crib.lua.
 
Oh, I understand now.

To be honest, I don't know much about interface scripting. I will try to find out a bit - or hopefully someone else knows more and can chime in.
 
Thanks for the reply. I don't know much too but I will try again to figure out too.
 
Back
Top