HotfireLegend
Balthier
- Xy$
- 0.00
Basically, I would like to check if a 'bullet' event hits the 'player' and/or vice-versa. 'bullets' hitting 'enemies' and 'events' is good too.
Here is the script in question:
http://mvplugins.com/plugin/Ramiro/PixelPerfectCollision
Now, the script has NO examples associated with it. This means I have no idea what parameters to put in for 'sprite'.
(The 'rect' one also seems to use shorthand in explaining what it is trying to say which is infuriating (especially given it doesn't look like the scripter's first language is English, no offense!), I am left to assume 'rectangle' ie the bounding area around the event/sprite (the square that the event is in) but this could be wrong...)
It says:
Sprite.prototype.collidesWith(SPRITENAME[, 1])
Sprite.prototype.collidesWith(SPRITENAMEANDID[, 1])
Sprite.prototype.collidesWith(EVENTNAME[, 1])
Sprite.prototype.collidesWith(EVENTID[, 1])
I am also assuming these go into an if statement with the Sprite.prototype.collidesWith(SPRITENAME[, 1]) (for example) in the 'script' field or something?
If this isn't what I am looking for, could anyone direct me to a better script for checking collisions between events, to a pixel-perfect scale?
Thanks.
Here is the script in question:
http://mvplugins.com/plugin/Ramiro/PixelPerfectCollision
Now, the script has NO examples associated with it. This means I have no idea what parameters to put in for 'sprite'.
(The 'rect' one also seems to use shorthand in explaining what it is trying to say which is infuriating (especially given it doesn't look like the scripter's first language is English, no offense!), I am left to assume 'rectangle' ie the bounding area around the event/sprite (the square that the event is in) but this could be wrong...)
It says:
This could be anything, like the following:Sprite.prototype.collidesWith(sprite[, alpha])
- Checks if two sprites are colliding by pixels.
- Parameters:
- sprite: The sprite to check collition.
- alpha: The tolerance to check collition, (by default 1)
if you are using alpha blending on your sprites considerer
giving it a larger value.
Sprite.prototype.collidesWith(SPRITENAME[, 1])
Sprite.prototype.collidesWith(SPRITENAMEANDID[, 1])
Sprite.prototype.collidesWith(EVENTNAME[, 1])
Sprite.prototype.collidesWith(EVENTID[, 1])
I am also assuming these go into an if statement with the Sprite.prototype.collidesWith(SPRITENAME[, 1]) (for example) in the 'script' field or something?
If this isn't what I am looking for, could anyone direct me to a better script for checking collisions between events, to a pixel-perfect scale?
Thanks.