Adding skill points

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!
Post Reply
User avatar
Frenchie
Posts: 219
Joined: Wed Oct 16, 2013 2:50 am

Adding skill points

Post by Frenchie »

I want to add 2 skill points to every champion and to my farmer 2 extra. I also try to make it shorter

Code: Select all

for i = 1, 4 do 
     party.party:getChampion( i ):addSkillPoints( 2 ) 
end
for i = 1, 4 do 
     if party.party:getChampion( i ):getClass == “farmer” then party.party:getChampion( i ):addSkillPoints( 2 ) 
end
If a condition is true does it get the value 1? If so I could use:

Code: Select all

for i = 1, 4 do 
     party.party:getChampion( i ):addSkillPoints( 2 + ( party.party:getChampion( i ):getClass == “farmer” )  * 2 )
end
Post Reply