Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
function giveskill()
for i=1, 4, 1 do
cclass = party.party:getChampion(i):getClass()
if (cclass == "wizard") then
party.party:getChampion(i):addSkillPoints(25)
end
end
end
Is there an easier way to do the line "party.party:getChampion(i):addSkillPoints(25)" ? Preferably I'd rather not have to do party.party:getChampion() every time. I think I could make a variable and add that part to it, but I'd rather use a way that would do something like keep the current Champion in focus, i.e.:
function giveskill()
for i=1, 4, 1 do
cclass = party.party:getChampion(i):getClass()
if (cclass == "wizard") then
party.party:getChampion(i):addSkillPoints(25)
end
end
end
Is there an easier way to do the line "party.party:getChampion(i):addSkillPoints(25)" ? Preferably I'd rather not have to do party.party:getChampion() every time. I think I could make a variable and add that part to it, but I'd rather use a way that would do something like keep the current Champion in focus, i.e.:
Well, that might work, but I think that's even clunkier than typing the full line each time. I was hoping for something like "using namespace std;" in C++ or whatever, but it's not that big of a deal.
lowena wrote:Well, that might work, but I think that's even clunkier than typing the full line each time. I was hoping for something like "using namespace std;" in C++ or whatever, but it's not that big of a deal.
Lol well the reason why I told you that was because you can add your own things to do even more complicated things so you can turn spawning entities into simpler things or other stuff the examples i gave I know arnt, really gonna help you much