what every object? lots of codingI use this to make one object serve as multiple objects. No longer will you need to make a different object for each square on a map! For each part of a boss that is destructible! For collision only objects that have different sprites! ...the list goes on.
Instance Creation Code
#81
Posted 09 July 2008 - 04:40 PM
#82
Posted 01 August 2008 - 07:12 PM
Great job, you rock.
#83
Posted 16 November 2008 - 02:52 PM
T
#84
Posted 16 November 2008 - 05:33 PM
~Very Melon
#85
Posted 29 November 2008 - 02:31 AM
#86
Posted 12 March 2009 - 02:40 AM
One of the main reasons im replying to this is to serve as a bump so others can learn this, its really quite useful..
#87
Posted 12 March 2009 - 11:52 PM
#88
Posted 13 March 2009 - 06:43 AM
T
#89
Posted 16 March 2009 - 09:48 PM
how would i make an object like for example obj_kaa appear in the room at a position.
(the object has code in it so i can move it around with the arrow keys)
Please could someone PM me the answer if they know. Thank you
Edited by Kalex91, 16 March 2009 - 09:52 PM.
#90
Posted 29 July 2009 - 07:00 PM
So I was wondering if it's possible to include creation code for an object that is made during the game. For instance say I want to build a structure (say a city or something) but I want it to be different from my other cities is there a way incorporate creation code on an instance_create? or do I need to make a bunch of different objects?
#91
Posted 29 July 2009 - 07:35 PM
#92
Posted 29 July 2009 - 07:55 PM
#93
Posted 21 September 2009 - 07:53 AM
#94
Posted 26 March 2010 - 10:10 PM
very very useful
thanks
#95
Posted 02 April 2010 - 08:49 AM
Thread resurrection!
So I was wondering if it's possible to include creation code for an object that is made during the game. For instance say I want to build a structure (say a city or something) but I want it to be different from my other cities is there a way incorporate creation code on an instance_create? or do I need to make a bunch of different objects?
with(instance_create(blabla)) {
execute your codes here
}
#96
Posted 28 December 2010 - 01:23 PM
Edited by The_Guilty_Gear, 28 December 2010 - 01:33 PM.
#97
Posted 19 December 2011 - 07:56 AM
#98
Posted 28 January 2012 - 07:29 PM
But I was wondering, being new to GML and all, how do I make the teleportation code to a different room relative?
Instead of just going to room1, can I write a code that'll make it go to room2, then3? Something like, "room_goto(next_level)" or something similar?
#99
Posted 18 June 2012 - 07:38 AM
I'm guessing you may have already solved it by now, but one possibility is to store the beginning rooms of each level in a global array at the game's start and make another global variable that stores the current level. Then, in the instance create code:This is really helpful.
But I was wondering, being new to GML and all, how do I make the teleportation code to a different room relative?
Instead of just going to room1, can I write a code that'll make it go to room2, then3? Something like, "room_goto(next_level)" or something similar?
teleport_room = global.level_firstroom[global.current_level + 1]
Also, a heads-up to everyone who uses variable_local_exists to set default values: as of GM Studio, the function is obsolete. As a workaround, I reccomend creating a script for each object using the ICC that defines the variables and call that before everything else in the ICC... or if that's too much of a hassle, just stick to GM 8.1 for the time being.
#100
Posted 26 June 2012 - 11:50 AM
I am using gm studio
and needed that teleport technique
but when i open it i html
it does not collide with it and just passes through
and when i open it in windows c++ runner
The window just closes down after the player object collides with the teleporter object
I am sure i used the code correctly in the same manner as described
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











