Need help with some basic coding

Started by aventurero, Sun 03/01/2010 23:19:39

Previous topic - Next topic

aventurero

Hello, I'm making some sort of graphic adventure/rpg and my character's got properties like "strength" and "intelligence". What I need to do is that raising one of those abilities, also raises another. For example, if the player gains 1 strenght, he also gains 2 HP. Thanks for your time!  :)

P.d: sorry for my bad english, I'm argentinian.
Code: ags
function iToxicWaste_Talk()
{
Display ("You eat the toxic waste. Obviously, you die.");
QuitGame (0);}

Crimson Wizard

#1
Erm... so what do you find a problem exactly? I mean, what cannot you do?


EDIT: Hmm, well, I was trying to think what can cause trouble for you. Maybe you can consider adding a function like

Code: ags

function IncreaseStrength (int ByValue)
{
   strength += ByValue;
   maxhitpoints += ByValue * 2;
}

SMF spam blocked by CleanTalk