game maker - Gamemaker teleport issue -
- i trying make "teleport" feature in gamemaker.
when hit spacebar, teleport state occurs. teleport object teleports player (because speeds game if not teleporting when player doesnt need it), gets direction player facing, teleports teleport object few pixels away few pixels @ time(this makes can make sure player wont hit walls when teleporting). teleports player teleport object. if teleport object hits wall, stop (thats earlier bit about) code simple, when hit space, teleport object doesnt move in slightest.
///teleport state // teleport player objteleport.x = objplr.x; objteleport.y = objplr.y; // --> right here error says "unecessary expression state used statement", appears no matter type on 4th line
objteleport.x += (hspd*10); objteleport.y += (vspd*10);
objplr.x = x; objplr.y = y;
state = scrmovestate;
Comments
Post a Comment