ProfCreepyPasta 1 Posted February 7, 2016 Are there any scripts that are like or similar to Undertale? I've been searching online and I can't find anything. Please help if you can. Share this post Link to post Share on other sites
Shiggy 630 Posted February 7, 2016 (edited) I have a script that can check collision between two sprites whatever their shape is . This could be used to make a shmup I can send it to you if you want. Edited February 7, 2016 by Shiggy Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 7, 2016 I have a script that can check collision between two sprites whatever their shape is . This could be used to make a shmup I can send it to you if you want. That would be cool Share this post Link to post Share on other sites
Siletrea 4 Posted February 7, 2016 this would be awesome! especially the act function so one could get out of battle without fighting! Share this post Link to post Share on other sites
Shiggy 630 Posted February 7, 2016 Here it is :https://www.dropbox.com/s/bds3eu150um6qoq/hitbox.rb?dl=0&s=sl I made some small modifications because it was made to work with a class of game objects I created not sprites and I also rewrite some part in a way that is at least more elegant if not more efficient. Thus there may be minor issues from the rewrite but normally it should work fine, I also added comments it should help you using te script Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 8, 2016 (edited) Here it is :https://www.dropbox.com/s/bds3eu150um6qoq/hitbox.rb?dl=0&s=sl I made some small modifications because it was made to work with a class of game objects I created not sprites and I also rewrite some part in a way that is at least more elegant if not more efficient. Thus there may be minor issues from the rewrite but normally it should work fine, I also added comments it should help you using te script Nice! but how do I use it? Edited February 8, 2016 by bws81691 Share this post Link to post Share on other sites
Shiggy 630 Posted February 8, 2016 sprite1.collision(sprite2) will return true if sprites are colliding and false if not There are several small stuff you can do to reduce computing time and avoid lag like use the smallest sprite as sprite1 This is not a script for a game,just a script that can help you make one Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 8, 2016 sprite1.collision(sprite2) will return true if sprites are colliding and false if not There are several small stuff you can do to reduce computing time and avoid lag like use the smallest sprite as sprite1 This is not a script for a game,just a script that can help you make one How do I use it in a battle though? Share this post Link to post Share on other sites
Shiggy 630 Posted February 8, 2016 sprite1.collision(sprite2) will return true if sprites are colliding and false if not There are several small stuff you can do to reduce computing time and avoid lag like use the smallest sprite as sprite1 This is not a script for a game,just a script that can help you make one How do I use it in a battle though? This is just a piece of code that detects collision between two sprites ,that's all it does. It's just a set of methods that can be called by other scripts To use it in battle ,you would would have to make a custom scene ,create a sprite that is controlled by the player, create bullet sprites and then use it to check if the player gets hit Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 8, 2016 sprite1.collision(sprite2) will return true if sprites are colliding and false if not There are several small stuff you can do to reduce computing time and avoid lag like use the smallest sprite as sprite1 This is not a script for a game,just a script that can help you make one How do I use it in a battle though? This is just a piece of code that detects collision between two sprites ,that's all it does. It's just a set of methods that can be called by other scripts To use it in battle ,you would would have to make a custom scene ,create a sprite that is controlled by the player, create bullet sprites and then use it to check if the player gets hit So I could make my own custom battle using events? Share this post Link to post Share on other sites
Shiggy 630 Posted February 8, 2016 (edited) I guess you could combine this with a pixel movement script and check if two events ( or one event and the player) are colliding and then make a custom battle out of this but this will likely be very laggy Edit : also I just checked in the code and characters are attributes of their sprites and not the opposite which means it would require additional scripting to have access to the sprite from events Edited February 8, 2016 by Shiggy Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 8, 2016 (edited) I guess you could combine this with a pixel movement script and check if two events ( or one event and the player) are colliding and then make a custom battle out of this but this will likely be very laggy Edit : also I just checked in the code and characters are attributes of their sprites and not the opposite which means it would require additional scripting to have access to the sprite from events I started creating an Undertale battle using the "show picture" event. I'm not good with scripting or anything. Edited February 8, 2016 by bws81691 Share this post Link to post Share on other sites
Shiggy 630 Posted February 8, 2016 From there the best way would be to use this picture as a background image and then code the gameplay over it but you can't use event for this,you have to code it yourself Share this post Link to post Share on other sites
ProfCreepyPasta 1 Posted February 8, 2016 From there the best way would be to use this picture as a background image and then code the gameplay over it but you can't use event for this,you have to code it yourself I don't know how to do that Share this post Link to post Share on other sites