Post new topic    
Liquid Metal Slime
Send private message
Give Party Experience Issue 
 PostWed Apr 29, 2015 11:38 pm
Send private message Reply with quote
I'm having an issue using giving experience to a party in a script. Instead of sharing the value amongst the entire team, this script gives the amount in its entirety to the first hero.

I know this probably isn't the best way to write what I'm doing, so beware of that. Any help uncovering the culprit would be much appreciated.

Code:
plotscript,begin
show textbox (2180)
wait for textbox
variable (xpmulti)
variable (xpmulti2)
variable (xpamount)
if (room in active party == 3) then (
xpmulti := 1)
if (room in active party == 2) then (
xpmulti := 2)
if (room in active party == 1) then (
xpmulti := 3)
if (room in active party == 0) then (
xpmulti := 4)
xpmulti2 := (get hero level(hero:Fred) * 10)
xpamount := xpmulti * xpmulti2
giveexperience (party, xpamount)
end

Cornbread Chemist
Metal King Slime
Send private message
 
 PostThu Apr 30, 2015 12:55 am
Send private message Reply with quote
There's nothing wrong with that script. And I just tested "giveexperience (party, *)", it works. Are all the heroes in the party alive? Dead heros only get experience if the general bitset for that is on.
Liquid Metal Slime
Send private message
 
 PostThu Apr 30, 2015 4:04 pm
Send private message Reply with quote
You're right. I'm an idiot. The other party members were dead Hurr
Cornbread Chemist
Display posts from previous: