Jump to content


Renegade605

Member Since 23 Jul 2006
Offline Last Active Aug 28 2010 10:26 PM

Topics I've Started

Create Event Wasn't Executing

26 April 2008 - 10:47 PM

I had a problem with my game and through debug mode I have determined that the create event of certain instances in the room is not executing. The following code is present in that event:
depth = x*y;
sprite_index = spr_wall;
However, once the game starts, certain instances of that object (wall) did not change their sprite nor their depth. I also find it odd that it's only certain instances of the wall, not all of them.
I have never seen or heard of this happening to anyone and I cannot figure it out.


I had found out that the problem must lie with a specific object (inactive_controller) which is present in the room. For, when I remove the instance, the instances that previously did not execute Create, do as they should. The code of the inactive_controller is as follows:
CREATE EVENT
{
   for (i = 1; i <= deactivated[0]; i += 1;)
   {
	  deactivated[i].image_alpha = 0;
	  instance_deactivate_object(deactivated[i]);
   }
   image_alpha = 0;
}

ALARM0 EVENT
{
   image_alpha += 0.04;
   if (image_alpha > 1) then image_alpha = 1;
   for (i = 1; i <= deactivated[0]; i += 1;)
   {
	  deactivated[i].image_alpha = image_alpha;
   }
   if (image_alpha != 1) then alarm[0] = 5;
}

STEP EVENT
{
   if (execute_string("return ball." +deactivated[deactivated[0]+1]))
   {
	  event_perform(ev_alarm,0);
	  for (i = 1; i <= deactivated[0]; i += 1;)
		 { instance_activate_object(deactivated[i]); }
   }
}

INSTANCE CREATION CODE
{
   deactivated[0]	=	 25;
   deactivated[1]	=  (103596);   deactivated[2]	=  (103597);   deactivated[3]	=  (103598);
   deactivated[4]	=  (103599);   deactivated[5]	=  (103600);   deactivated[6]	=  (103601);
   deactivated[7]	=  (103602);   deactivated[8]	=  (103603);   deactivated[9]	=  (103604);
   deactivated[10]   =  (103605);   deactivated[11]   =  (103606);   deactivated[12]   =  (103607);
   deactivated[13]   =  (103608);   deactivated[14]   =  (103609);   deactivated[15]   =  (103610);
   deactivated[16]   =  (103611);   deactivated[17]   =  (103612);   deactivated[18]   =  (103613);
   deactivated[19]   =  (103614);   deactivated[20]   =  (103615);   deactivated[21]   =  (103616);
   deactivated[22]   =  (103617);   deactivated[23]   =  (103618);   deactivated[24]   =  (103619);
   deactivated[25]   =  (103620);
   deactivated[26]   =  "x > 1024";
}

This object should not be affecting the instances other than those specified with the deactivated[x] array, yet it did.

Just as I was about to post this topic however, the problem resolved itself. That is to say, I ran the game once more in debug mode to run some more tests, and the game worked fine. So while it is not imperative that I know, it would be interesting to find out why this occurred, and possibly there's an easy way to avoid it in the future.

Need Pipe Sets

06 April 2008 - 02:26 AM

Hello, I'm looking for some pipes to fit in with my new game, and was hoping I could get some help.
If anyone wants to make these, or knows where I could find some would be great. Examples of grid snapping at end of post.

Applies to all:
Should be 20px in diameter.
The end of the segment should be a slight bit wider than the rest of the pipe.
One set gold/bronze, and one set silver (could just be a grayscale version of the first).
Arcade Style, to fit this wip.
Highlighted as if light source was coming from top right.

Straight Pipes: Pipes should be drawn in segments of 32px, 64px, 96px, and 128px. Horizontal and Vertical. (See Figure A)
Curved Pipes 1: Pipes with 90 deg. corners. Should have one tight, two mid-range, and one wide turn. Must align with pipes inside a grid. The pipes will be centered in a 32x32 grid. (See Figure B )
Curved Pipes 2: 'Squiggly' pipes, one segment 128px long, another 96px; both moving 32px to the side (one each way). (Figure C )
Junctions: To fit the same 32x32 grid of pipes. One large (96x96), and one small (32x32). (Figure D)


EXAMPLES: The dotted grid is 32x32
Figure A: Posted Image
This segment is 128px long; there should also be a 96px, a 64px, and a 32px.

Figure B: Posted Image
This should be about the widest size.

Figure C: Posted Image
This one is 96px long; there should also be a 128px.

Figure D: It wouldn't let me put this one in... So click here to view!
This is 96x96, another should be another the same design but in a 32x32 size.

Variable Undefined?

01 March 2008 - 02:38 AM

I have a code which is supposed to create an instance of an object at a position defined in a text file. The code should then set the 'specialid' variable in the new instance. However, when I execute the code, it gives me an error stating that the variable (id of the new instance -- 'object' in this case) is unknown.

{  
   var level,length,text,object;

   level = file_text_open_read(working_directory +'\levels\leveltest.lvl');

   /*
   ...
   Irrelevant Code
   ...
   */
   
   execute_string("object = instance_create(" +file_text_read_string(level) +")");
   object.specialid = real(text);
   
   /*
   ...
   More Irrelevant Code
   ...
   */
}

Note: The string it reads from the text file would look like this (without quotes)
"10,5,obj_character"

I quote the error message:

Error in code at line 27:
            object.specialid = real(text);

at position 11: Unknown variable object



Did I miss something totally obvious? Or is there a devious force at work?

Accidental Upload

21 January 2008 - 07:43 PM

I was looking at the system YYG has to upload games to see how it worked, and I accidentally went too far and actually uploaded the 'game'. It's two random pictures I had and the GM exe itself.

Should I contact YYG by e-mail to resolve this? If not, what should I do?

Bitwise Operators

18 November 2007 - 11:37 PM

What does a bitwise operator actually do? What is bitwise?

I tried printing out a table (10x10) of column^row to see if there was a pattern. But it looks almost totally random, other than it's a symetrical table. So what are they?