Original Source
- Original title: Making rules for multiple events
- Original author: Geoff Moore
- Original date: July 25, 2014
- Source thread: https://forums.rpgmakerweb.com/threads/making-rules-for-multiple-events.30340/
- Source forum path: Game Development Engines > Legacy Engine Support > RPG Maker VXAce Support
Summary
I'm making a minigame where a mother racoon has to save her babies from a witch, and the baby racoon will follow either the witch or the racoon. I want to add more racoon babies and enemies to it, but the way I'm doing it the eventing is going to get kind of out of hand, and is going to make it really hard to go back and change stuff if I need to. I'm wondering if there's a way to apply rules to multiple events. For example: {...
Archived First Post
Protected download
Protected download
This common event (triggered by a parallel process) checks if a baby racoon (events 2 through 6) is 1 tile away from the witch (event 7). If true, the baby racoon follows the witch UNLESS the player is 2 or less tiles away from the baby racoon. The conditional branch code goes off the edge of the screenshot, the first nested pair read like this:
($game_map.events[2].x - $game_map.events[7].x).abs + ($game_map.events[2].y - $game_map.events[7].y).abs == 1
($game_player.x - $game_map.events[2].x).abs + ($game_player.y - $game_map.events[2].y).abs <= 2
And then that's repeated all the way down the event with the [2] increasing to repeat the logic for each racoon baby.
So, my question is, can I just have one bit of code that checks this for any baby racoon and any enemy, rather than having to make a separate condition for every single combination of baby racoon and enemy?
I hope I explained that okay. Thanks for reading!
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
Topic Summary
Loading summary...

