Jump to content


Asurd

Member Since 07 May 2012
Offline Last Active Private

Posts I've Made

In Topic: Obj_Player Disappears

24 March 2013 - 08:04 AM

This is because GM no longer draws the object's sprite automatically if you use it's Draw event. To fix this simply add the following line of code in the draw event:

 

 

draw_sprite(sprite_index,image_index,x,y);
 

Or better yet, if you are using GM 8.1(or above) you can just use:

 

 

//use this in the draw event
draw_self();
 

In Topic: Sonic Engine 360 (Essentials)

03 March 2013 - 06:20 AM

Oh yeah! The engine worked just fine when I removed the "sleep(2000)" from the 2nd action in the "player" object's step event:D

In Topic: Sonic Engine 360 (Essentials)

02 March 2013 - 01:25 PM

What makes it incompatible?

It's because many of the original GM functions are now obsolete in GM:S. This engine uses some of them(such as the "sleep" function). If you want to make it GM:S compatible then I suggest you download the Mips edition(which is available for free), check out which functions are obsolete and then think of a workaround to them.

In Topic: Movement

25 February 2013 - 04:29 AM

I'll never understand why I need to subtract, but it works.


The function "(keyboard_check(key))" returns 1(true) if the given key is pressed or 0(false) if it isn't. So suppose you are using this code:
hspeed = (keyboard_check(vk_right) - keyboard_check(vk_left)) * 5;
So we will have three possibilities here:

Case 1: The right key is pressed and the left key isn't:
Then the "keyboard_check(vk_right)" will return 1 and the "keyboard_check(vk_left)" will return 0. So the code will basically be:
hspeed = (1 - 0) * 5;//This will set the hspeed 5(as 1*5 = 5)

Case 2: The left key is pressed and the right key isn't:
Then the "keyboard_check(vk_right)" will return 0 and "keyboard_check(vk_left)" will return 1. So the code will be:
hspeed = (0 - 1) * 5;//This will set the hspeed to -5( as-1 * 5 = -5)

Case 3: Both the left and right keys are pressed:
The hspeed will be set to 0:
hspeed = (1 - 1) * 5;//The hspeed in this case will be 0(as 0 * 5 = 0)

Case 4: Neither the left nor the right key is pressed:
The hspeed will be set to 0 as both "keyboard_check(vk_right)" and "keyboard_check(vk_left)" will return 0:
hspeed = (0 -0 ) * 5;//The hspeed in this case will be 0( as 0 * 5 = 0)

Hope that helps:)

In Topic: Planetoids - 3D Gravity Platformer

01 February 2013 - 02:30 PM

The tech demo 6 is simply awesome, man!