RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Getting money from an NPC.

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 82
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!

**
Rep: +0/-0Level 82
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 
 
 

****
Rep:
Level 84
Will you join me in the dark side...?
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:


**
Rep: +0/-0Level 82
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

**
Rep: +0/-0Level 82
It works thanks!