Large Event Collision

Large Event Collision


2016.07.15


by Shaz


Introduction


This script allows you to specify a single event that covers an area larger than a single tile, for the purposes of collision.


How to use


Add to your scripts folder in the Materials section.


Add a comment to the event page as follows: <collide: a b> where a indicates how many tiles the event should cover horizontally, and b represents how many tiles the event should cover vertically.  The event itself should be in the lower left corner of the collision region.


Examples:


<collide: 1 3> will allow the event to be triggered from its own tile, or the two tiles above it


<collide: 2 1> will allow the event to be triggered from its own tile or the tile to the right


<collide: 2 2> will allow the event to be triggered from its own tile, from the one to the right or the one above, or from the tile to the top-right


Script


Download from pastebin


Credit


Shaz


Terms


Free for use in commercial games


Note


This script only works for stationary events - if you have an event that moves around and you want to increase the collision area, do not use this script as it does not cover requirements for moving events.
Wow this sounds very useful and easy to use!
Okay so I've tested your plugin and I'm not quite sure if I have done something wrong. So far I'm trying to do so that i have a 3x3 area around my event like this


xxx


x0x


xxx


where the 0 is the event and the x is the region that people can interact with the event.


What I've written is:  <collide 3 3> and a text box, that's all and i can't get it to work :/
Add a comment to the event page as follows: <collide a b> where a indicates how many tiles the event should cover horizontally, and b represents how many tiles the event should cover vertically.  The event itself should be in the lower left corner of the collision region.



No - the event has to be in the lower left corner of the area you want it to cover. 


xxx


xxx


0xx


This is to avoid the issue that happens where you say an even number of tiles across if it were centered - you can't do half-tile collisions.


If you have a sprite that is actually that big, use that in one event, then use a second event with no sprite, for the collision area.  Make sure you change the priority to 'same as characters', as it defaults to 'below' when you don't have a sprite.


Also note (as you missed that bit in the first post, you might have missed this bit as well) - if your event is moving, this script is not suitable to use.  It's ONLY for non-moving events (in fact, I think ALL the events I use it on are ones that have no sprites).
No - the event has to be in the lower left corner of the area you want it to cover. 


xxx


xxx


0xx


This is to avoid the issue that happens where you say an even number of tiles across if it were centered - you can't do half-tile collisions.


If you have a sprite that is actually that big, use that in one event, then use a second event with no sprite, for the collision area.  Make sure you change the priority to 'same as characters', as it defaults to 'below' when you don't have a sprite.


Also note (as you missed that bit in the first post, you might have missed this bit as well) - if your event is moving, this script is not suitable to use.  It's ONLY for non-moving events (in fact, I think ALL the events I use it on are ones that have no sprites).

So I can't use it for when people enter the 


xxx


xxx


0xx


Area to run some code that for an example says some text? Like just make the trigger area bigger, than one tile?
oh, sure.  If you want people to be able to walk over it, leave it as Below Characters.  Your attempt to put it in the middle made me think you had a sprite, which you might not want the player to walk over.
oh, sure.  If you want people to be able to walk over it, leave it as Below Characters.  Your attempt to put it in the middle made me think you had a sprite, which you might not want the player to walk over.



Oh no it's not a sprite just a region people step over, so far it's not working. Just tried it :/ Could you maybe take a fast look at it, with this screenshare? https://join.me/237-073-405
@Artonn - Got it.  I've updated the script.  Please download the new version.


I couldn't respond to you in your join.me
Got it.  I've updated the script.  Please download the new version.


I couldn't respond to you in your join.me



You fixed it works now!
Large Event Collision


2016.07.15


by Shaz


Introduction


This script allows you to specify a single event that covers an area larger than a single tile, for the purposes of collision.


How to use


Add to your scripts folder in the Materials section.


Add a comment to the event page as follows: <collide: a b> where a indicates how many tiles the event should cover horizontally, and b represents how many tiles the event should cover vertically. The event itself should be in the lower left corner of the collision region.


Examples:


<collide: 1 3> will allow the event to be triggered from its own tile, or the two tiles above it


<collide: 2 1> will allow the event to be triggered from its own tile or the tile to the right


<collide: 2 2> will allow the event to be triggered from its own tile, from the one to the right or the one above, or from the tile to the top-right


Script


Download from pastebin


Credit


Shaz


Terms


Free for use in commercial games


Note


This script only works for stationary events - if you have an event that moves around and you want to increase the collision area, do not use this script as it does not cover requirements for moving events.

The script is great, thanks. However, do you (or anyone) please know where to find/how to create a very similar event which works for moving events too?
@Yehnye
I thought someone did write one, but I have no idea where it would be. Did you check the master script list? It's in the pinned thread in this forum - takes you to a wiki page where you can sort and search.
@Yehnye
I thought someone did write one, but I have no idea where it would be. Did you check the master script list? It's in the pinned thread in this forum - takes you to a wiki page where you can sort and search.
Thanks, I'll try to look for it there 🙂

Original thread: https://forums.rpgmakerweb.com/threads/large-event-collision.65368/