Gamemaker Backstab/teleport

obj_player

create event:

spawn_id = 0

step event:


inst = instance_place(x,y,obj_spawn_point)
if inst//create/update spawn point
{
spawn_id = inst
}
if (keyboard_check(ord('T')))//move to last spawn point
{
x=spawn_id.x;
y=spawn_id.y;
}
//movement code
if (keyboard_check(ord('A')))  {x-=5;}
if (keyboard_check(ord('D')))  {x+=5;}
if (keyboard_check(ord('W')))  {y-=5;}
if (keyboard_check(ord('S')))  {y+=5;}


obj_enemy

step event:

x++

No comments:

This will make you a better decision maker | Annie Duke (author of “Thinking in Bets” and “Quit”, former pro poker…

Annie is a former professional poker player, decision-making expert, author, and special partner at First Round Capital.  ͏     ­͏     ­͏   ...

Contact Form

Name

Email *

Message *