(Request)How can I make a script that enables and disables characters on the map?
Posted: Thu Mar 03, 2022 5:39 pm
help
I've been searching and testing a script:
I add this script to map.lua and me and only allows the characters I want. But I have tried that when a certain level is finished or a boss is defeated, a new character can be selected, that it is activated with an event.
So I put this script on one level and it didn't work:
I think you have to put another kind of code in the map.lua that it is activated at the end of a certain level, but I do not know how to do it.
would greatly appreciate the help to make this script
I've been searching and testing a script:
Code: Select all
local pm = require("playerManager")
pm.overworldCharacters = {1,2}
So I put this script on one level and it didn't work:
Code: Select all
local pich = {}
function pich.onEvent(eventName)
if eventName == "pich" then
SaveData[Level.filename()] = SaveData[Level.filename()] or {}
SaveData[Level.filename()].missionClear = true
pm.overworldCharacters = {1,2,3,4}
end
end
would greatly appreciate the help to make this script