Jump to content


Catan

Member Since 21 May 2005
Offline Last Active Today, 12:36 PM

Posts I've Made

In Topic: Combining Objects Into One Object

17 June 2013 - 11:32 AM

I think you should have only a single object for the player vehicle, and have only the sprite change accordingly to what the player built. What you need to do is generate a sprite dynamically by "merging" all the various parts chosen by the player, you can do this by drawing the pieces on a surface and turning that surface into a sprite by using sprite_create_from_surface . Remember to delete the surface once the sprite has been created, and to also delete the sprite if you don't need it anymore.


In Topic: Depth And Click Problem

15 June 2013 - 03:16 PM

I think one easy solution could be to set a global variable on the left pressed event of those objects in order to execute only one of the event. Something like:

/* left pressed event */
if(global.left_pressed) {
    global.left_pressed = true;
    //your code
}

/* end step event */
global.left_pressed = false;

In Topic: [Gm8.0] Max Number Of Arguments?

12 June 2013 - 07:16 AM

If you have a lot of items to choose from, you can insert them into an array or a ds_list and extract a random one using the irandom function.


In Topic: Creation Code Problem

11 June 2013 - 04:58 PM

As stated in the manual, the creation code of the instances is executed AFTER the creation event, therefore AS is not yet initialized when you call your condition. If you really need to set this in the creation code, you can execute your condition in the room start event (if this doesn't cause any problems to your setup) or program an alarm with the condition to start after 1 step


In Topic: Gmsdb - Game Maker Simple Database V1.2

30 May 2013 - 06:30 AM

Can you post your function call? Does it work without sorting?