Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Akumayo on Sat 22/05/2004 20:17:41

Title: Comparing Global Ints
Post by: Akumayo on Sat 22/05/2004 20:17:41
When using Global Ints as stats in an RPG game, say that HERO's attack power is 40 SetGlobalInt(2,40);
And the MONSTER's h.p. is 50 SetGlobalInt(23,50);
How do I make HERO's attack power be minused from MONSTER's h.p.????
Title: Re: Comparing Global Ints
Post by: strazer on Sat 22/05/2004 20:59:14
SetGlobalInt(23, GetGlobalInt(23)-GetGlobalInt(2));

should do it?
Title: Re: Comparing Global Ints
Post by: Akumayo on Sat 22/05/2004 21:17:59
THANK YOU SO MUCH, NOW I CAN MAKE MY RPG!!!