I need a function like getExp
But I only see getLevel f.ex.
I want to find the character in the party with the least experience points...any suggestions?
Is there a way to retrieve Exp
Re: Is there a way to retrieve Exp
I suppose you know function below or I understood you incorectly ? To search min exp person is too complicated for me sory 
-- XP gain for all members + text and music
function xpaward()
party:getChampion(1):gainExp(50)
party:getChampion(2):gainExp(50)
party:getChampion(3):gainExp(50)
party:getChampion(4):gainExp(50)
hudPrint("You have discovered Secret. 50xp gained !")
playSound("secret")
end

-- XP gain for all members + text and music
function xpaward()
party:getChampion(1):gainExp(50)
party:getChampion(2):gainExp(50)
party:getChampion(3):gainExp(50)
party:getChampion(4):gainExp(50)
hudPrint("You have discovered Secret. 50xp gained !")
playSound("secret")
end
Re: Is there a way to retrieve Exp
Yeah - I want to give some exp to the one with the lowest amount
For now I can only check for level, so it doesnt do exactly what I want
For now it gives exp to the character with the lowest level, and if more have the same level it gives to the last character (as I use "<=" and not just "<"), depending on their placement number:
1 2
3 4
For now I can only check for level, so it doesnt do exactly what I want
Code: Select all
function secretLevel()
minLevel = 9999
for i = 1,4 do
print(party:getChampion(i):getLevel())
if party:getChampion(i):getLevel() <= minLevel then
minLevel = party:getChampion(i):getLevel()
luckyChamp = i
end
end
party:getChampion(luckyChamp):gainExp(200+100*minLevel)
playSound("level_up")
hudPrint(party:getChampion(luckyChamp):getName().." gained "..200+100*minLevel.." exp")
--party:getChampion(luckyChamp):getExp()
timer_1:deactivate()
timer_1:setTimerInterval(1)
end
1 2
3 4
Re: Is there a way to retrieve Exp
Does a "secret" grant experience? I know in a modded game I played, it did but does it grant experience by default? If not, how would I add something like this function to the discovery of a secret? The "secret" in the dropdown for 'logic' doesn't have anywhere to add a function. I was going to try the cloneobject but not sure how to do it. Thanks for any help.Drakkan wrote:I suppose you know function below or I understood you incorectly ? To search min exp person is too complicated for me sory
-- XP gain for all members + text and music
function xpaward()
party:getChampion(1):gainExp(50)
party:getChampion(2):gainExp(50)
party:getChampion(3):gainExp(50)
party:getChampion(4):gainExp(50)
hudPrint("You have discovered Secret. 50xp gained !")
playSound("secret")
end
Re: Is there a way to retrieve Exp
You would have to set it up yourself for each secret, not by editing anything with the "secret" directly but just by having the same hidden pressure plate (or whatever triggers the secret) also trigger your script to add the XP (and maybe a hudPrint message about it)
Finished Dungeons - complete mods to play
Re: Is there a way to retrieve Exp
and when u add the exp script (Drakkan's above works just fine, u can change the amount, or the hudPrint), make sure the trigger only activates once, or is connected to a counter set to 1 to trigger the script, or you will have an unlimited exp loop. Also, the script can be triggered from multiple connectors, so you do not need to make dozens of them.
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades