Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Newbie here needing event/switch whatever help

The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: archnal on May 23, 2009, 11:58:46 PM

Title: Newbie here needing event/switch whatever help
Post by: archnal on May 23, 2009, 11:58:46 PM
Hey i'm new to Rm2k3, like i know how to map fairly well, and i can simple like message events but i need help with switches and such. well ill explain: i have a NPC outside of a pub and his message is "hey pal! get me a beer and i'll give you a rare item!" like idk how to change the message for when u have a beer in your inventory, i want it so like when u have a beer he says "Thanks pal! here you go!" then u get a potion (i know how to add items)
then AFTER U GET THE POTION FROM HIM I WANT HIM TO SAY "Thanks again!" NO MATTER HOW MANY TIMES U TALK TO HIM! EVEN WITH BEER! so basically i dont want it to repeat help me plz? sorry for ramblin :s
Title: Re: Newbie here needing event/switch whatever help
Post by: Sirius on May 24, 2009, 01:24:45 AM
Start with a conditional branch, and make the condition if party possesses Beer (Second page, first option). Directly under that, put your message as "Thanks pal! here you go!" add your potion, and turn on a switch. Make a new page, and set the precondition to that switch. In that command box, have him say "Thanks again!" and that should do it.
Title: Re: Newbie here needing event/switch whatever help
Post by: Kathryn on May 24, 2009, 01:34:12 AM
m'kay :3

*attempts to answer first*

This is actually pretty simple.

FIRSTLY, Make a conditional branch that activates when a switch is turned on.

THEN, in that little part that's like "OTHERWISE" make ANOTHER conditional branch that activates when you have one beer in the inventory.

So you'll have a few conditional branches, and it should be like this:

CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

 CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
 <>
 ELSEWISE
 <>
 END BRANCH
 <>
END BRANCH
<>


So now you're gonna have to dump your messages in there.

So, the first time you talk to this guy, you're probably not gonna have a beer and the switch DEFINITELY won't be turned on. So your first message should go:

CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

 CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
 <>
 ELSEWISE
 <[RIGHT HERE]>
 END BRANCH
 <>
END BRANCH
<>


all in that little section. Then, the second message, when you have a beer, is gonna be

CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<>
ELSEWISE

 CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
 <[RIGHT HERE]>
 ELSEWISE
 message "HEY, GIMMIE A BEER."
 <>
 END BRANCH
 <>
END BRANCH
<>


So, after you get that message in, you're gonna need to dump that first switch in after that. SO INSIDE THAT LITTLE SECTION, IT SHOULD BE LIKE:

CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
message "YO MAN, THANKS!"
Switch WHATEVER is turned ON
<>
ELSEWISE
message "HEY, GIMMIE A BEER"
<>
END


THEN, YOU PUT THAT FINAL MESSAGE right in that first little switch section.




CONDITIONAL BRANCH IF SWITCH WHATEVER IS ON
<[Yeah, right here]>
ELSEWISE

 CONDITIONAL BRANCH IF 1 BEER IN INVENTORY
 message "YO MAN, THANKS!"
 Switch WHATEVER is turned ON
 <>
 ELSEWISE
 message "HEY, GIMMIE A BEER"
<>
END
 <>
END BRANCH
<>


And that should be it. I know it's confusing, so if you have any questions just ask me ._.

[EDIT]: Basically what Sirus said, lol
Title: Re: Newbie here needing event/switch whatever help
Post by: Nessiah on May 24, 2009, 02:35:34 AM
Or you could just do.

If Hero has beer
Thanks
Switch Beer On
Make New Page Even with Switch beer on on the sidebar on the left and have that message loop

else

Where's mah beer

Many ways to do it really @_@
Title: Re: Newbie here needing event/switch whatever help
Post by: Kathryn on May 24, 2009, 03:24:37 AM
Actually, that was pretty much what we all said XD

Yeah, the way Nessy said to do it will be much easier to edit, however...

SO YES. DO IT - the Nessy way 8D
Title: Re: Newbie here needing event/switch whatever help
Post by: Roxaszu on June 09, 2009, 04:43:58 PM
Well, You just need to
1. make 2 page in an Event
2. First one, Is for Hi, If you bring me the bir , I'll give you something
3. Then, After you got it, At the second page, You Put on Precondition "Item : Beer"
4. After that, You just simply lose 1 beer and get 1 potion, And the event will back to the first one, When he ask the beer again  :)
Good luck on trying ;)
Title: Re: Newbie here needing event/switch whatever help
Post by: Kathryn on June 09, 2009, 10:54:55 PM
M'KAY, TWO THINGS:

I do believe this is rather old.

Also, I think after two weeks if he had any further questions he would have asked for help, in which place it would be appropriate to jump in :)