Page 1 of 1

Hello! I'm new to this & I need some help.

PostPosted: Tue Apr 27, 2010 3:45 am
by linkshards
Hello everyone, I'm a new user here, just call me Zach.
I came across Game Editor to build a better concept about game design and I've been playing with it for awhile nao. I need some help, already. Maybe you guys are willing to help? :D

I know quite a junk about Java programming, but not a lot about C, but it looks very similar, but I'm having one issue:
I have a character, and I do not want him to walk off screen. I want him to stay on screen at all times, the game is a window 640 x 480.
What do I need to do to to make sure he doesn't walk off screen? [There is an actor behind him that acts as a background.]

Re: Hello! I'm new to this & I need some help.

PostPosted: Tue Apr 27, 2010 3:56 am
by Hblade
Well you could do:
Keydown: Right
Code: Select all
if (xscreen<640)
{
    x+=4;
}

Keydown: Left
Code: Select all
if (xscreen>0)
{
    x-=4;
}

That should do it :3

Same thing for up and down too :D If you need help with up & down lemme know :D

Re: Hello! I'm new to this & I need some help.

PostPosted: Tue Apr 27, 2010 5:05 am
by linkshards
Perfect! :D It worked! Thank you!
Also, I have another problem sadly. :(
The character I created has proper movement and everything, however the animation does not keep up with it sometimes.
For example, my character has Down Keys walking animations for north, south, east, and west. He also has Up Keys for all 4 standing-facing directions.

My issue is that sometimes my character stand-faces one direction, but is still moving until I release the keys and continue in the direction I was heading for it to fix itself and do the correct walking animation.

Re: Hello! I'm new to this & I need some help.

PostPosted: Tue Apr 27, 2010 1:14 pm
by Hblade
This is caused by using the standard methods of ChangeAnimation. I've fixed this in this topic here

The code may look confusing but just look for the "ChangeAnimation" events in the coding, and then change the "player" to your players name, then change the "Walk Left" stuff to your players animation name :)

It might look confusing but after you look at it it's not that bad :D If you still need help I'll explain it in full detail :3

Re: Hello! I'm new to this & I need some help.

PostPosted: Wed Apr 28, 2010 3:01 am
by linkshards
Thanks for the post, but I still seem to be having some trouble with this.

I followed the direction, but it seems that I can only move one direction at a time, and I can't move in all directions.

EDIT: Wait! Nevermind! Found my problem. :3

Re: Hello! I'm new to this & I need some help.

PostPosted: Wed Apr 28, 2010 3:55 am
by Hblade
k, glad it helped ^.^

Re: Hello! I'm new to this & I need some help.

PostPosted: Wed Apr 28, 2010 5:16 am
by linkshards
Wait wait, XD I'm stuck. I've been trying to get my character to move using the new diagonal movement.ged, but my character just seems to stay in one place. The math is right, but I can't seem to figure out what I'm doing wrong. I used the Draw Actor correctly and nothing seems to be working. I would only think it's the Draw Actor method because it's the only one using the grid to get my character moving.

Re: Hello! I'm new to this & I need some help.

PostPosted: Wed Apr 28, 2010 12:55 pm
by Hblade
It has to do with the STATE variable, PM me your ged and I'll see if I cant get you 8way movement :D