Page 4 of 5
Posted: Wed Nov 09, 2011 3:00 am
by boywhoflies
I decompiled your game and found a missing comma in it! *shot*
Posted: Wed Nov 09, 2011 9:36 pm
by Nobody
Ergh. After some changes, you still can't move despite the fact that you should be able to. whywhywhy
Posted: Wed Nov 09, 2011 9:46 pm
by boywhoflies
-voulenteers to look at your engine-
Posted: Wed Nov 09, 2011 10:30 pm
by MyNameIsKooky
Nobody wrote:Ergh. After some changes, you still can't move despite the fact that you should be able to. whywhywhy
You have the "relative" box checked in the "if there's a solid collision at relative position (0,1)" thingies in the step event, right?
Posted: Wed Nov 09, 2011 11:05 pm
by Nobody
Yes.
Posted: Wed Nov 09, 2011 11:06 pm
by MyNameIsKooky
Can you post the updated pseudo-code?
Posted: Wed Nov 09, 2011 11:15 pm
by Nobody
Code: Select all
Step Event:
if relative position (0,-4) is collision free for Only solid objects
set the gravity to 4 in direction 270
else
set the gravity to 0 in direction 270
if vspeed is larger than 10
set the vertical speed to 10
Collision Event with object Metal:
set the gravity to 0 in direction 270
Key Press Event for <Left> Key:
if relative position (-1,0) is collision free for Only solid objects
jump relative to position (-4,0)
Key Press Event for <Right> Key:
if relative position (1,0) is collision free for Only solid objects
jump relative to position (4,0)
Posted: Wed Nov 09, 2011 11:20 pm
by MyNameIsKooky
Looking good, except for two problems.
Code: Select all
Step Event:
if relative position (0,-4) is collision free for Only solid objects
It should be relative position (0,4), not (0,-4). Negative in the y-coordinates is upwards in Game Maker.
Code: Select all
Collision Event with object Metal:
set the gravity to 0 in direction 270
You shouldn't need to use gravity in the collision events. For collisions with walls and stuff, use this:
Code: Select all
move in direction direction at most 16 till a contact with solid objects
start moving in directions 000010000 (which is the box thingy in the middle) with speed set to 0
I'd be happy to just take the .gmk file for you and fix it, but I can't access my computer right now because I'm backing up all of my stuff (I'm using my mom's computer right now).
Posted: Fri Nov 11, 2011 2:06 am
by Nobody
Since there's barely anything in the GMK as of now I decided to post it freely.
Posted: Fri Nov 11, 2011 2:06 am
by Nobody
Since there's barely anything in the GMK as of now I decided to post it freely.
Posted: Fri Nov 11, 2011 2:10 am
by DEEMAN223344
IMMEDIATE PROBLEM
DON'T use the "Press" events. Use the normal ones.
Posted: Fri Nov 11, 2011 2:17 am
by DEEMAN223344
Fixed it. It was a lot of fun.
Posted: Fri Nov 11, 2011 2:19 am
by Nobody
Eh, I still can't move while on the ground...?
EDIT: Oh, you didn't actually fix it. Now that I did... I still can't move. Huh.
Posted: Fri Nov 11, 2011 2:26 am
by MyNameIsKooky
Here's your de-bugified thingy.
If you want him to jump lower or fall faster, experiment with different values of gravity and vertical speed in the step and spacebar events respectively.
Posted: Fri Nov 11, 2011 2:28 am
by DEEMAN223344
Nobody wrote:Eh, I still can't move while on the ground...?
EDIT: Oh, you didn't actually fix it. Now that I did... I still can't move. Huh.
Yes I did. I even tested it.
Edit: I actually forgot to save.
Posted: Fri Nov 11, 2011 2:29 am
by Nobody
DEEMAN223344 wrote:Nobody wrote:Eh, I still can't move while on the ground...?
EDIT: Oh, you didn't actually fix it. Now that I did... I still can't move. Huh.
Yes I did. I even tested it.
In that case maybe you uploaded the wrong file.
Posted: Sat Nov 12, 2011 8:59 pm
by Nobody
DP.
Erm, how do I put the text engine from the ET5 topic in and how do I control what it says?

Posted: Sat Nov 12, 2011 9:07 pm
by MyNameIsKooky
Nobody wrote:Erm, how do I put the text engine from the ET5 topic in
Put all of the code and sprites from the engine into your game.
Nobody wrote:and how do I control what it says?
Edit the code that's in the create event.
Posted: Mon Nov 14, 2011 3:37 am
by Nobody
I don't understand. Why doesn't my headshot work???
Posted: Sun Nov 20, 2011 4:15 am
by Nobody
oh nevermind my game maker got closed without saving stuff so now the text engine and dialog is gone so i'll have to bring it all back before i fix the problem
Posted: Sun Nov 20, 2011 4:16 am
by MyNameIsKooky
Nobody wrote:I don't understand. Why doesn't my headshot work???
Be more specific. Is the sprite you're using 32x32?
Posted: Sun Nov 20, 2011 4:27 am
by Nobody
Erm, false alarm. The stuff didn't get deleted. Anyways, I changed it to 32x32 from 32x33 and it still doesn't work.
Posted: Sun Nov 20, 2011 4:33 am
by MyNameIsKooky
It's supposed to be 32x32.
And what do you mean by "it doesn't work"?
Posted: Sun Nov 20, 2011 4:58 am
by Nobody
ERROR in
action number 1
of Create Event
for object obj_type:
Error in code at line 32:
img[1] = spr_lorgo
^
at position 2: Unknown variable img or array index out of bounds
Posted: Sun Nov 20, 2011 6:52 am
by MyNameIsKooky
The first index should be 0, not 1. It should be like this:
str[0] = "BLAH BLAH BLAH"
str[1] = "BLAH BLAH BLAH
str[2] = "BLAH BLAH BLAH*"
img[0] = spr_bob
img[1] = spr_joe
img[2] = spr_alex
name[0] = "Bob"
name[1] = "Joe"
name[2] = "Alex"
Also, make sure you actually have a sprite named "spr_lorgo" (without the quotes).
Posted: Sun Nov 20, 2011 7:00 am
by Nobody
It is like that, only the other character has no headshot.
Posted: Sun Nov 20, 2011 7:06 am
by MyNameIsKooky
You need to have all of the arrays defined and the headshot sprites need to exist, otherwise it will get an error.
Posted: Sun Nov 20, 2011 2:12 pm
by boywhoflies
MyNameIsKooky wrote:It's supposed to be 32x32.
If this means anything, I'm using 34x34 or something like that for Circuit and it looks fine.
I knew it was intended to be 32x32 when I did that, though.
Posted: Sun Nov 20, 2011 8:36 pm
by MyNameIsKooky
boywhoflies wrote:MyNameIsKooky wrote:It's supposed to be 32x32.
If this means anything, I'm using 34x34 or something like that for Circuit and it looks fine.
Unless you look closely and realize that it's 2 pixels too big.

Posted: Sun Nov 20, 2011 8:46 pm
by Nobody
Now none of the variables can be found. I added an even that makes them, but the text and box aren't getting displayed.