Fangames > Engines

I Wanna Be the Engine KS Edition (For GMStudio)

<< < (10/25) > >>

klazen108:
Does your player's end step look like this? (some comments and spacing removed so I could fit it all on my monitor at once :P )
(click to show/hide)
There's probably just some more code in the event that has changed since the version you have.

Kyir:
My player's endstep is only

if (place_meeting(x,y,playerKiller)) {
    killPlayer();
}

Also, this Japanese image is showing up the background and it doesn't seem to actually be in the sprite or background list and??? Is my version of the engine haunted?



My only idea is that I somehow messed up in fixing the GUI and somehow told Game Maker to draw one of the commented out sections of text but I really don't think even I could mess up code that badly. It also only seems to be happening in a single room of the project.

klazen108:
Uhhhhhhhhhh....

Yeah idk why you would have random Japanese text showing up, looks like it could be a font texture problem. I'll need some more details to figure it out. Does it happen in every room, every time? Or just occasionally? Is it always the same image, or does it look different sometimes? Any objects that you add that seem to cause it to happen? is 'Clear Display Buffer with Window Colour' checked in the room editor under views?

For the collision stuff, you should replace your end step event with the new version, I'll paste it here so you don't have to download the whole thing:
(click to show/hide)
--- Code: ---//Check for collisions with blocks
xx=round(x)+.5;
yy=round(y);
o = collision_rectangle(x-5.5,y-12,x+5.5,y+8.5,block,1,1);
//o = instance_place(xx,yy,block); //o = other
if (o != noone) {

    if (o.solid) {
        x=xprevious;
        y=yprevious;
    }
   
    if (place_free(xx+hspeed,y) == false) {
        if (hspeed <= 0) { // Left | 左
            move_contact_solid(180,abs(hspeed));
        }
        if (hspeed > 0) { // Right | 右
            move_contact_solid(0,abs(hspeed));
        }
        hspeed = 0;
    }
   
    // strange bug in GM studio - keep player from turning around and getting stuck in the wall behind him
    if (!place_free(x,y)) {
        if (place_free(x-1,y)) x-=1;
        else if (place_free(x+1,y)) x+=1;
    }
   
    // Check for blocks above/below | 上下に壁がある時 
    if (place_free(x,y+vspeed) == false) {
        if (vspeed <= 0) { // Above | 上
            move_contact_solid(90,abs(vspeed));
            y=ceil(y); //shift the player down so we don't end up inside the block (prevents deaths to spikes in block)
        }
        if (vspeed > 0) { // Below | 下
            move_contact_solid(270,abs(vspeed));
            djump = true; //restore djump if standing on a block
        }
        vspeed = 0;
    }
   
    // 斜めの位置に壁がある時
    if (place_free(x+hspeed,y+vspeed) == false) {
        hspeed=0;
    }
   
    if (o.solid) {
        x+=hspeed;
        y+=vspeed;
    }
   
    //Fix for platforms - if you place a platform against a wall and run toawrds the wall while jumping up
    //the platform will attempt to shift you to the top of it, but the x=xprevious y=yprevious
    //code here will return you down, thus getting you caught in a loop and making the kid get stuck.
    if (y_offset != 0) {
        y=y_offset;
    }
}

if (place_meeting(round(x),round(y),playerKiller)) {
    killPlayer();
}

y_offset=0;
--- End code ---

Then make sure to add the code to player create & platform player collision like I said a couple posts ago, and your platforms should work. If you get another errror, well, then I forgot to copy some code again

Kyir:
It's only happening in one room, and something I did moved it at some point without actually changing any code or anything in that room. It appears to be the same text every time, but I don't have a screenshot of what it was before it moved. That box also is checked, should it not be? I think it was on by default.

EDIT: I cleared all the tiles and objects from that area of the screen, and that made that particular instance of the message go away, so I guess it has something to do with one of them?

klazen108:
Ok yeah, it sounds like it was a texture issue all along. Are you shift-dragging or ctrl-dragging to select multiple tiles on a tileset? Because when you do, game maker will let you select outside the boundaries of the tileset. And that tileset is actually part of a larger image onto which game maker packs all your graphics for your GPU... and I would guess that it just so happens that there was some Japanese text stored over there :Kappa: It's hard to diagnose because it typically shows as blank in the room editor, but in-game can be whatever is resident in your graphics memory.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version