Submit Your Article Guild Wars 2 Forum RPG Maker VX.com
 
RPG Maker
 

 Username:
 Password:
   Not a member? Register!



Home > Tutorials > RPG Maker XP > Steal From Npc.

Steal From Npc.


Ok this Tutorial is to show how to make system where, you can steal from the npc in the game.

Ok here is the First Step.

1 - Make a new Varable Called Steal.

Here is the Second Step.
2 - Then go to Control Varable, and select the varable Steal from the list of varables. Once you have done that then Select random from the Operand list, I have mine set to 1 though 10, you can set it up to how ever you would like it to have.

3 - Once you done this, make a npc anywhere on a map you would like to. In the event list make a you have a conditional branch and set the varable steal to, Less then are equal to 5. Once that is done, it means that when the player touches the npc are how ever you have the npc event setup to respond to the player. The game will run a random choice, which you wont see but if the choice is less then 5 you wont be able to steal anything from that npc, else if it is greater then 5 you will steal a item gold are what ever you choose from that npc.

Now that is the basic version of the steal system, one thing though is that you can keep trying to steal from a npc if it fails. So how could you make the system more in depth well you could always make a switch called StoleFailed, and StoleSucced. These switches, will make this system much more indepth. Now if you followed the basic system above you will be able to Add More event based code to the conditional branch Steal, Now as before if the player gets less then 5, he fails at stealing a item. So lets add a switch under that called StoleFailed, and set it to on. Once this is done, make a new event page and have the conditions switch to StoleFail on. Then you could Add text to the npc such as "How dare you try and steal from me." Well that ends the Stole Failed switch. Now lets look at the Stole Succed Switch.

Steal Succes Switch, as above if the player gets higher then 5 the succed in stealing from the npc. So should we let the player keep stealing from it? I think not and we can solve this problem by adding a Switch called StoleSucces to the Conditional Branc Steal, under Else.
Once We have that Switch Turned on after stealing from that npc make a new event page which would be page three, and have the condition switch StealSucces turned on and have the Npc Say something like "Haha" Or what ever you would like them to say.

Well that finsih my first Tutoral I hope you enjoyed it any question feel free to leave comments are PM me. 
Details
Tutorial: Steal From Npc.
Date Listed: Wed, 06 Aug 2008 18:18:03 -0700
Author: 2dgamestudio
Total Hits: 3297


Embed
Short URL:

HTML:

BB Code:



RPG RPG Revolution
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.

RPG RPG Revolution is an Privacy Policy and Legal