if collision_rectangle(bbox_left+1,bbox_bottom-1,bbox_right-1,bbox_top+1,Obj_Wall1,true,true) || collision_rectangle(bbox_left+1,bbox_bottom-1,bbox_right-1,bbox_top+1,Obj_Wall,true,true)
{
y=y-1
}Any help is appreciated. If you think the problem is outside of that code then tell where you think the problem lies and I can post or change that code. Thanks!
Note: I am using
Edit1:
Chances are this is because the object is getting pushed to xprevious and yprevious after this event. Try putting this in the endstep.
Edit: Hrm.. then again if you were in xprevious/yprevious this wouldn't occur. Darned moving solids again
Btw, what is actually happening with this code?
This is the code for when the player collides with the boss
if place_meeting(x+1,y,Obj_Cloudmanbig) then hspeed=0
if place_meeting(x-1,y,Obj_Cloudmanbig) then hspeed=0
if place_meeting(x,y+1,Obj_Cloudmanbig) then vspeed=0
if place_meeting(x,y-1,Obj_Cloudmanbig) then vspeed=0
direction=other.direction
hspeed=other.hspeed
if bbox_bottom<428 && (place_meeting(x+1,y,Obj_Cloudmanbig) || place_meeting(x-1,y,Obj_Cloudmanbig)) && !place_meeting(x,y+1,Obj_Wall1)
{
y+=3
}
Other than that the boss does not affect the players speed or direction in any way. (As far as I can remember)
Edit2:
I just looked at my test code (I have a section for code that may or may not work in my step event) and realized I had this in there.
if place_meeting(bbox_left-1,y,Obj_Cloudmanbig)
{
hspeed=other.hspeed
}
if place_meeting(bbox_right+1,y,Obj_Cloudmanbig)
{
hspeed=other.hspeed
}
if collision_line(x,y,x,bbox_bottom+1,Obj_Cloudmanbig,true,true)
{
var obj;
obj=collision_line(x,y,x,bbox_bottom+1,Obj_Cloudmanbig,true,true)
x += obj.hspeed
}
The second part is for when you are standing on his head. (Although due to the way everything works it may affect you while you are on his side)
Edited by nanoviro, 27 February 2012 - 06:41 AM.











