Jump to content


Ikero

Member Since 21 Oct 2006
Offline Last Active Nov 24 2010 11:18 PM

Topics I've Started

Shacky Screen

24 November 2010 - 06:46 PM

*I have a boat obj with a sprite that is 16x16.
*The view in the room is 213, 160.
*The port on screen is 640, 480.
*The view is set to follow the boat.
*The Hbor is 213, and the Vbor is 160.

The Problem: When I press "A" or "D", it turns the boats direction + or - 2, along with the image_angle. When it's direction is anything but 0, 90, 180, or 270, and I press "W" ( for moving forward ), it makes the screen shake.

When the Hbor and Vbor isn't set so that it keeps the boat in the center of the screen all the time ( meaning anything smaller then 213, and 160 ), it doesn't shake; however, I need the boat to be in the center always.

How To Make Images Go Slower

21 March 2010 - 05:18 AM

How do you make the images run through slower?

Keys

21 March 2010 - 04:16 AM

ok so i need to know how to make it so in step event if a key is pressed then a variable = true if it's release then the variable = false  :GM8:

Randomcodeproblem

16 March 2010 - 09:43 PM

Ok, I have several problems with the random(x) function and I don't understand why. I looked in the manual and im pretty sure I'm using it correctly, however, it's not working.  
(The goal is to generate different types of clouds and different speeds)

So the first problems is in my obj_cloudGen:

Creation Event:
[codebox]time=random(5);[/codebox]

Step Event:
[codebox]time-=1
if time=0
{
instance_create(x,y,obj_cloud);
time=random(50);
}

[/codebox]

(The goal of this obj is to place it on the left side of the screen in more then one place and have it so at random times between 50 it creates a obj_cloud )

The next problem is in obj_cloud:
Creation Event:
[codebox]move=random(6);
cloudType=random(4);

if cloudType=0{sprite_index=global.spCloud1}
if cloudType=1{sprite_index=global.spCloud2}
if cloudType=2{sprite_index=global.spCloud3}
if cloudType=3{sprite_index=global.spCloud4}[/codebox]

The global.spCloud1,2,3,4 are all variables holding information to get the sprite from a folder ( I know this works, tried it seperatly )

Step Event:[codebox]x+=move;[/codebox]

Backgrounds

16 March 2010 - 07:11 PM

ok so I have a obj. In the creation event of this obj is this:

global.rmNum=1;
bgLoad();

bgLoad is a script and in the script i have this:

if global.rmNum=1
    {
    bgHomeIsland = background_add(working_directory+"\Sprites\HomeIsland.jpeg",false,true,false);
    background_index[1]= bgHomeIsland;
    }

but when i put that obj in the room, nothing loads and it doesn't give me an error, so what am i doing wrong?