SOLVED: Display total points and act accordinaly

Started by barefoot, Mon 31/01/2011 17:27:21

Previous topic - Next topic

barefoot

Hi

Main Player collects points ($) by obtaining cash and goods.. so far so good...

I have been looking for the answer to this:

I need another character to check the main player's total points and display text and do things according to how much the main player has.

eg

if Main Player has say over 15000 points then display and do this..

else do this..

So its really just knowing how to script it in.

Hope ive explained ok. cheers for any help you can give

barefoot









I May Not Be Perfect but I Have A Big Heart ..

barefoot

#1
This seems to do the trick (unless you know better):


(Have used fake total for this exercise)

Code: ags

function room_AfterFadeIn()
{
   Display("You arrive at Lazlo's dirty, dingy room!");
   cfence.Say("Hiya Fanito, long time no see!");
   cPaul.Say("Hi Lazlo. How's business?");
   cfence.Say("So so. What you got?");
   Display("He looks at what you've got");
   Total = (Total + 10000);
   Display("Total: $%d", Total);
    
{ 
    if (Total>12000)
    
 Display("well done Fanito");
    
    
    else  Display("Bad luck Fanito");
  {

}  
} 
}


barefoot

I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk