Machiavelli24
Mod creator
- Joined
- May 9, 2012
- Messages
- 818
Update:
I worked around the issue by using LuaEvents to pass the input & outputs. The outputs were added by side effect in normal lua code that listened for the event.
--------------------
There are some lua functions that work fine when I use them as part of normal lua files but don't work when I use them as part of quests. For example, player:HasPerk doesn't seem to work. Add and remove perks work, but not evaluating.
There also doesn't seem to be a way to tell what cargo loadouts a player has within a quest. PreGame (for PreGame.GetLoadoutCargo(playerID)) doesn't work. There is a Game.GetLoadoutSpacecraft(playerID) but no similar method for Cargo.
Is there any known way to work around these limitations?
I worked around the issue by using LuaEvents to pass the input & outputs. The outputs were added by side effect in normal lua code that listened for the event.
--------------------
There are some lua functions that work fine when I use them as part of normal lua files but don't work when I use them as part of quests. For example, player:HasPerk doesn't seem to work. Add and remove perks work, but not evaluating.
There also doesn't seem to be a way to tell what cargo loadouts a player has within a quest. PreGame (for PreGame.GetLoadoutCargo(playerID)) doesn't work. There is a Game.GetLoadoutSpacecraft(playerID) but no similar method for Cargo.
Is there any known way to work around these limitations?