Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   RPGMaker (http://zelaron.com/forum/forumdisplay.php?f=188)
-   -   Need help with rpg maker xp (http://zelaron.com/forum/showthread.php?t=39843)

phsyco025 2006-06-19 02:43 PM

Need help with rpg maker xp
 
ok i have a lady standing outside her house and when u talk to her she tells you her husband is sick and she asks u to help. if u say yes she tells u to get her a potion and she will give u a key in return . i wanna make it so that when u give her the potion then she gives u a key. also i want it so that the next time u talk to her she says something else like have u found a potion yet. some1 plz help thnks also how do u put the picture of a character next to the mesage bar when they are talking

BlueCube 2006-06-19 04:52 PM

You need to think about what this event actually does:

1) First meeting, "Go get a potion"
2) Talked to her already, "So, do you have the potion? Yes/No"
3) Already gave her the potion, "Thanks for your help!"

3 different settings = 3 pages. Easy enough from there:

[Page 1]
No preconditions
Code:

<> Message: "I need a potion for some reason, go get it!"
<> Set variable [xxxx:PotionQuestState] to 1
<>

[Page 2]
Precondition: PotionQuestState greater than or equal to 1
Code:

<> Message: "Do you have the potion?"
<> Show choices: Yes, No
: [Yes] handler:
  <> Conditional branch: Potion possessed
      <> Items: Subtract 1 potion
      <> Message: "Thanks for this, have this key I guess"
      <> Items: Add 1 key
      <> Set variable [xxxx:PotionQuestState] to 2
      <>
  : Else Handler
      <> Message: "Don't lie to me, I'm old!"
      <>
  : End
: [No] handler
  <> Message: "You lazy good-for-nothing bum!"
  <>
: End
<>


[Page 3]
Precondition: PotionQuestState greater than or equal to 2
Code:

<> Message: "Thanks for your help!  Get off my lawn!"
<>


I recommend using variables for keeping track of how far along you are in any given quest. This saves switches and makes more sense overall because a quest is not ON/OFF, it is Not started/in progress/finished, and may have even more states within it (halfway done, interrupted, failed, etc)

phsyco025 2006-06-19 05:41 PM

ok im sorry but i got some of that but im really new to this stuff so i have no idea wut switches or variables are so could u plz break it all down for me? and thanks for the first answer

BlueCube 2006-06-19 06:24 PM

Switch = ON or OFF - you can check its state, change it a specific state, or toggle it

Variable = Integer - you can do basic math and comparisons, or explicitly set it to a number


Nothing complicated. All switches are OFF and all variables are 0 by default.

phsyco025 2006-06-19 06:28 PM

ok ill give it a try rite now and ill let u no how it worked thx

phsyco025 2006-06-19 07:06 PM

Ok sweet it worked. i had a bit of trouble but it was just because i was making a couple of mistakes but in the end it worked thanks alot

phsyco025 2006-06-19 07:18 PM

jus 1 mopre question. where u put PotionQuestState does it have to say that or could i put like Quest or Potion or anything else

BlueCube 2006-06-19 09:46 PM

Anything, but keep them somewhat descriptive so you know which switch/variable does what. No fun to go through and have 49 variables all labeled "Quest"

phsyco025 2006-06-20 10:36 AM

ok thank you


All times are GMT -6. The time now is 05:21 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.