Auto Tile Your Walls By Nocturne
#41
Posted 01 September 2010 - 09:29 AM
#42
Posted 01 September 2010 - 09:41 AM
The only way to do as you ask, is to place instances OUTSIDE the room... Or create a special instance and instead of have it run the script, tell it directly which of the sprites/tiles it should be. This can be done by creating a seperate object with no create code and then in the room editor you press <CONTROL> and RMB on the object. At the bottom of the pop-up menu is "creation code" or something similar. This opens a very useful codebox that allows you give ONLY THAT INSTANCE code that is run BEFORE the create event. In this code box you can tell the object what tile or sprite index it should have... Itīs a bit tedius for large games, but my latest game "Black Out" uses this for almost every object in the game! Which is why each level took about 4 days to complete... Oh and you would probably have to create a parent for all wall objects so that the rest of them detect properly the "empty" edge objects...
#43
Posted 07 September 2010 - 09:53 AM
instance_create(-12,-12,OuterWall);
The obvious problem is that it now creates a lot of OuterWalls which slows the game down. But when I replace it with the following code it completely fails to work:
if !instance_exists(OuterWall) {instance_create(-12,-12,OuterWall);}I've tried creating the OuterWall at room creation and within a different object with a depth both above and below the Wall but the only way it works is if I put the instance_create in the Wall creation code. I've got no idea why it's behaving this way.
#44
Posted 07 September 2010 - 09:55 AM
#45
Posted 08 September 2010 - 01:21 PM
#46
Posted 17 October 2010 - 09:14 PM
Thank you, I will certainly give credit for this!
#47
Posted 14 January 2011 - 09:35 AM
Mine may not be the best coded, but itīs still the only one that covers EVERY possible option (47 different tiles), comes with itīs own templates and can be used for tiles or sprites and real time or static...
#48
Posted 14 January 2011 - 10:14 AM
#49
Posted 19 March 2011 - 04:45 AM
#50
Posted 08 April 2011 - 08:18 AM
#51
Posted 09 April 2011 - 11:32 PM
#52
Posted 10 April 2011 - 05:50 AM
#53
Posted 11 June 2011 - 03:13 AM
Wall Tile Set
#54
Posted 11 June 2011 - 06:13 AM
#55
Posted 22 January 2012 - 12:55 AM
#56
Posted 22 January 2012 - 02:47 AM
EDIT: This would also solve Ant's problem. Set all the temporary variables based on place_meeting() and whether or not the coordinates you're testing (such as [x,y+32]) lie outside the room.
Edited by ND4SPD, 22 January 2012 - 02:49 AM.
#57
Posted 22 January 2012 - 07:14 AM
Looks like a good system, but a little inefficient. Would it be better to have some temp variables, like r,tp,t,tl,l,bl,b,br that hold whether there is a collision to the right, topright, top, topleft, left, bottomleft, bottom, bottomright, so that you dont have to keep calling place_meeting()?
EDIT: This would also solve Ant's problem. Set all the temporary variables based on place_meeting() and whether or not the coordinates you're testing (such as [x,y+32]) lie outside the room.
This CAN be done better, yes... But I wrote it before I knew too much about GML!!! And I haven't changed it because in it's current form it's VERY newbie-friendly, in that it's easy to see exactly how and why it works. Thnaks for the comments however!
Oh, and thank you orange08!!! Glad you like it!
#58
Posted 22 January 2012 - 02:05 PM
Surely it'd still be "newbie-friendly"? Especially if it solves someones problem. Not saying you have to change it! Just seems like a faster, better way of doing things.
Looks like a good system, but a little inefficient. Would it be better to have some temp variables, like r,tp,t,tl,l,bl,b,br that hold whether there is a collision to the right, topright, top, topleft, left, bottomleft, bottom, bottomright, so that you dont have to keep calling place_meeting()?
EDIT: This would also solve Ant's problem. Set all the temporary variables based on place_meeting() and whether or not the coordinates you're testing (such as [x,y+32]) lie outside the room.
This CAN be done better, yes... But I wrote it before I knew too much about GML!!! And I haven't changed it because in it's current form it's VERY newbie-friendly, in that it's easy to see exactly how and why it works. Thnaks for the comments however!
Oh, and thank you orange08!!! Glad you like it!
If Ant is reading this, you now know how to fix it! Just swap out the place_meeting() functions with variables!
#59
Posted 16 July 2012 - 10:10 PM
This is great Nocturne! now I don't have to be at the computer for another 5 mins trying to put titles in the room, and to make sure there all there.
#60
Posted 03 September 2012 - 01:28 PM
Thanks for the millionth time Nocturne. You are an awesome person for helping as much as you do.
Edited by C_Pike, 03 September 2012 - 04:03 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











