Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
![]() ![]() |
Jan 25 2012, 10:40 PM
Post
#1
|
|
![]() Type: Designer Alignment: Neutral Good |
This is my first post here guys and the first somewhat complex event I tried to make, so please bear with me. I have only been doing this a few weeks, so there is likely a more efficient/simpler way to do this. If so feel free to post it/comment and I will update my event. I welcome criticism so long as it is constructive. Here goes nothing, I hope you find it useful!
The first image contains my pickpocketing common event. Explanations are commented into the event, and the other events that it calls are posted in the next image. The success/failure rates and messages/rewards are simply examples. Spoiler: The second image contains the accessory common events that are called by the pickpocketing common event as well as the example event itself. Spoiler: The third image shows a working pickpocketable event. Spoiler: Notice the move pattern. The event is on fix direction so that when the player uses the action button to attempt to rob him (from behind), the event does not turn around. If the even turns around, even briefly, the variables for recording the event's direction do not work properly and the event will not run. The move pattern is the first 5 lines repeated 20 times. Those 5 lines are intended to mimic a regular random walking pattern (and can be altered or turned off obviously). I repeated them 20 times (copy/paste) because in some cases, say the event managed to walk into an area in which it was surrounded on 3 sides by impassable objects, the event would get stuck. The event would have a 3/4 chance of trying to walk into an impassable object which would cause it to bug out. I repeated them 20 times to give the event a (3/4)^20 (basically negligible) chance of getting itself stuck. It would certainly be possible for a player to intentionally freeze an event with this command if he/she was so inclined and patient. The event also uses a kill processing script for convenience (to end the event through a common event). The script makes using common events much easier but is by no means necessary: CODE # Kill processing - event command that ends processing in the current event # and ALL referring events. # Use the as an advanced > Script event command # kill_processing class Game_Interpreter attr_accessor :next_kill_process def kill_processing if @main command_end # clears the event list, unlocks the event else @list = nil # clears the event list @next_kill_process = true # sets the next event up to be cleared end end alias update_KillProcess update def update update_KillProcess if @child_interpreter != nil && @child_interpreter.next_kill_process # sets kill processing flag self.kill_processing @child_interpreter = nil end end alias running_KillProcess running? def running? # tricks the system into thinking the event is still running until its # referring event can also be cleared return true if @next_kill_process return running_KillProcess end end I originally saw this posted by Mithran http://www.rpgmakervx.net/index.php?showtopic=15543&st=0&p=136159&#entry136159. Ideas for building on this event include a global variable that holds the players "reputation" in a given area (changed by stealing/getting caught stealing) and/or a hidden "sneak" level. Depending on your type of game all sorts of things could be added in! I ask that if you use (or build off of) this event in your projects that you reference me (Iysif) at some point. Feel free to use it for any free (ie non-commercial) purposes, but if you would like to use it in a commercial product I ask that you contact me first either through a PM here or an email at nottheill1@live.com Have a good one! -Iysif |
|
|
|
Jan 26 2012, 11:24 PM
Post
#2
|
|
![]() Type: Artist Alignment: Chaotic Evil |
Thanks for a new tutorial! However, your images shrunk (I think it's Photobucket shrinking them because of the size), which makes it impossible to read what you've done. Could you re-upload them in the correct size?
|
|
|
|
Jan 27 2012, 12:25 AM
Post
#3
|
|
![]() Type: Designer Alignment: Neutral Good |
You're welcome! I hope the community likes it.
Oh my bad! It's my first time using photobucket as well. I'll get on that ASAP and fix it definitely by tomorrow. I'm really busy right now though |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st May 2013 - 02:20 AM |
|
|