Granting experience

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
spikedsynapse
Posts: 4
Joined: Sun Dec 07, 2014 4:53 am

Granting experience

Post by spikedsynapse »

does anyone know a way to grant experience for solving a puzzle?

My dungeon is puzzle heavy, and i would like them to get a reward for completing the puzzles.
GoldenShadowGS
Posts: 168
Joined: Thu Oct 30, 2014 1:56 am

Re: Granting experience

Post by GoldenShadowGS »

Code: Select all

function getXP250()
	for i = 1, 4, 1 do
	party.party:getChampion(i):gainExp(250)
	end
	hudPrint("250 XP")
end

function getXP500()
	for i = 1, 4, 1 do
	party.party:getChampion(i):gainExp(500)
	end
	hudPrint("500 XP")
end

function getXP1000()
	for i = 1, 4, 1 do
	party.party:getChampion(i):gainExp(1000)
	end
	hudPrint("1000 XP")
end
spikedsynapse
Posts: 4
Joined: Sun Dec 07, 2014 4:53 am

Re: Granting experience

Post by spikedsynapse »

dude you are friggin awesome!

:D

i never would have figure that one out

thanks so much
Post Reply