Author Topic: Getting money from an NPC.  (Read 398 times)

0 Members and 1 Guest are viewing this topic.
mattyrose2
**
Rep: +0/-0
Offline Offline
Level 51 (84%)
Getting money from an NPC.
« on: February 09, 2010, 01:47:33 AM »

  • I am making my first game so I'm not very good yet so plz be patient with me!

    Anyway, in the game i am making at the start there is an old man in the village and he gives you 10 gold. i figured out how to do that, but
    so far i cant figure out how to stop him giving you ten gold. you could stand there all day an by the end be a millionaire!
    so could someone plz tell me how to make him stop giving money away!

    thanks!
    bulmabriefs144
    **
    Rep: +0/-0
    Offline Offline
    Level 51 (79%)
    Re: Getting money from an NPC.
    « Reply #1 on: February 09, 2010, 09:53:54 PM »

  • Barring a switch (which is lame, just for that), and making a Condition- If Old Guy Gave you 10 gold, you can also do it by variable.  Set the variable to 1 after a single time, then make a condition - OldManGift = 1 at the top of the page, with an else.  put the gift inside the else, and add the variable Set Equal to 1 at the end of the else, and voila! You have a single page event. You can even string several conversations on a single page, like so.

    Condition - OldMan is 2
    -(Whatever you want)
    Else
      Condition - OldMan is 1
      -(Etc)
      -Variable OldMan, Set 2
      Else
         Condition - OldMan is 0
         -(More crap)
         -Variable OldMan, Set 1 
     
     
    DarkGamer Male
    ****
    Rep: +9/-12
    Online Online
    Level 56 (87%)
    Will you join me in the dark side...?
    Re: Getting money from an NPC.
    « Reply #2 on: February 10, 2010, 07:04:21 PM »

  • Event
    add money 10G
    Message:Take this 10 gold
    set variable oldman=1

    Condition - OldMan is 1
    -(Whatever you want)
    set variable oldman=2
    Else
      Condition - OldMan is 2
      -(Etc)
      -Variable OldMan, Set 3
      Else
         Condition - OldMan is 3
         -(More crap)
         -Variable OldMan, Set 4

    And so on.That's how it's done...
    Everytime you talk to him, it will raise the value of the variable oldman, and you can add as many as you want. but in your case, only one would be needed!

    Event
    add money 10G
    Message:Take this 10 gold
    set variable oldman=1

    Condition branch - if var. OldMan is =1
    -show message: Use it well!!!!

    My Puzzle/StandAlone game in a week:

    mattyrose2
    **
    Rep: +0/-0
    Offline Offline
    Level 51 (84%)
    Re: Getting money from an NPC.
    « Reply #3 on: February 11, 2010, 02:03:19 AM »

  • thanks guys! :D I'll try it next time i can use rpg maker! if it doesn't work ill come back crying with lots of questions! lol thanks!

     ;8 ;8 ;8 ;8
    mattyrose2
    **
    Rep: +0/-0
    Offline Offline
    Level 51 (84%)
    Re: Getting money from an NPC.
    « Reply #4 on: February 12, 2010, 07:47:19 PM »

  • It works thanks!
     

    hi

    RMRK.net Theme Super Ultra Mega Beta

    Follow RMRK on Twitter Ask RMRK Questions on Formspring Get RMRK Updates via Windows Live

    Page created in 1.043 seconds with 18 queries.