Espion+MovingPlats

Posted by s on Feb. 11, 2007, 5:57 p.m.

Okay,before I get to the focus,I'd lke to say the 64D icon should have a little D under the 4.[6^4=1296]

Now then,continuing with my on going plight to perfect a platform engine…

I have now created a blood emitter effect cuz I never really use emitters and I figured it'd be nice to have people spray red pixels everywhere that don't vanish whenever they die.

The part that isn't working is the moving platform,which works to the point of going back and forth…But I want it to carry a person.I've used instance_place to do the checking of coordinates,but it seems that function and the collision ones all ways go buggy on me…[Using GM5]

Well,here's the platform code.

var _x,_y;
_x=x
_y=y
if x=x1&&y=y1{step=2}
if x=x2&&y=y2{step=1}
if step=1{
if x>x1{x-=sp}
if x<x1{x+=sp}
if y>y1{y-=sp}
if y<y1{y+=sp}}
if step=2{
if x>x2{x-=sp}
if x<x2{x+=sp}
if y>y2{y-=sp}
if y<y2{y+=sp}}
_x-=x
_y-=y
with instance_place(x,y,all){
x+=_x
y+=_y}
with instance_place(x,y-1,all){
if object_index!=wal{
x+=_y
y+=_x
}}

To reintegrate my gunshot offset,I decided to try window_client_left and window_client_top?It worked for window mode,though not for FullScreen.Credits to Flea1991's offset idea.SCREW MOUSE_SET_SCREEN_POSITION!!!

Alright!BlogID=13666,2 birds with 1 stone!

QED

Comments

s 17 years, 10 months ago

I don't show the gun,just a scope.

I'm simulating the gun lashback,by using mouse_set_screen_position.

Flea1991 17 years, 10 months ago

To your last question, if you are just trying to realign your bullet's offsetting to look like it's coming out of the gun then no.

You can, however use "sprite_xoffset" and "sprite_yoffset" though. [:)]

EDIT: Sorry, I meant "sprite_set_offset."

s 17 years, 10 months ago

That may work…though it could get out of hand since the offset would never be set back to 0 until the level was done.

And for how the gun system looks,its a bit like TacticalAssassin.

YAY!Offset works.

Arcalyth 17 years, 10 months ago

Quote:
[23:22/53] melee-master: http://64digits.com/users/index.php?userid=serprex&cmd=comments&id=13666

[23:22/54] melee-master: HIS CODE.

[23:22/55] melee-master: O_O

[23:23/12] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: MAIM

[23:23/12] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: MAIM

[23:23/13] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: MAIM

[23:23/14] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: KILL

[23:23/16] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: DEATH

[23:23/17] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: HE DIES

[23:23/18] &#1033;&#345;&#962;&#955;&#316;&#1118;&#359;&#1106;: NOW

[23:23/20] melee-master: XD

s 17 years, 8 months ago

That's right,I got an AWSOME BlogID!

(I do hope no harm is meant to strike upon me?)