Jump to content


TheCalled

Member Since 17 Jul 2005
Offline Last Active Sep 05 2011 01:54 AM

Posts I've Made

In Topic: Puffy Trail Array

18 August 2011 - 04:07 PM

You have only told GameMaker what the first entry of each array is.

You have to set them manually or with a loop. A 1D array can also be set to 0 by using Array[Last_Entry] = anything you like I believe but I'd prefer to make sure they were with a loop.

for(i=0;i<max_enteries;i+=1) { Array[i] = 0 } ;


Thank you! That was most helpful. I just set the highest array value in the create event, like you mentioned, and it works fine now.

In Topic: mario kart finish line

18 August 2011 - 03:53 PM


Where are you initializing global.lap?
I would hazard a guess and say you are doing it at the start of a lap, thus it is being reset. Move it to an object which only gets executed once when the game starts and you should be fine.

i use the object that displays the character and i set the variable to 0 so when the camera collides with the object it will stayt on lap 1/5 instead of going to lap 2/5. but i get this thing where it loops through all of them when i collide with it and goes back to lap 1.

Sounds like the number is getting added to as long as you're in collision with the camera, or whatever it is. You might try setting a variable that trips when you make the first contact, so that it won't continue to add while you are still in contact with it.

As a side note, you should probably also consider what would happen if you go backward over the lap line, since you probably don't want the player to be able to score a lap, just because he crossed the line after backing up two seconds earlier.

In Topic: fractional lives

12 August 2011 - 12:03 AM

OK, let me clarify some things first.
The the "chance" variable represents the possibility that the enemy will be damaged?
It also sounds like you should create some other variable besides "lives." I think you want something more like hit points (hp) or "health," although "health" is also built in to Game Maker.

In Topic: Game Maker Gives Me An Error At Startup? Why?

27 January 2010 - 05:18 PM

I have had this problem before. It's an issue with Windows Vista. I got it to go away when I turned off something called "User Account Control" in the Windows Security Center. The Windows Security Center can be found in the control panel.
I hope that works. I never found a real use for User Account Control anyway.

In Topic: Getting An Id Which Collides With A Vector

26 January 2010 - 04:56 PM

Oh, ok. Well I think I've figured out how to make this work. I just made a shadow object that follows the player object around, but along the ground.
x=obj_player.x+16
for (i=obj_player.y; place_free(x,i+1); i+=1)
{
	y=i
}
I am now trying to make the image grow and shrink when the player goes up and down, while at the same time blending, and also fading away the higher up he is. It's looking like blend modes don't get along with alpha values.
draw_set_blend_mode(bm_subtract)
draw_sprite_ext(spr_shadow,0,x,y+4,distance_to_object(obj_player)/25,distance_to_object(obj_player)/25,
						0,c_white,1/(distance_to_object(obj_player)+0.01))
draw_set_blend_mode(bm_normal)
The image is a gradient black and white ellipse. Take note of the blend mode and the final piece of the draw_sprite_ext code.
This is probably new topic material, but if you have any ideas...