Jump to content


Photo

Follow object help


  • Please log in to reply
2 replies to this topic

#1 chaoscontroldx

chaoscontroldx

    GMC Member

  • GMC Member
  • 41 posts
  • Version:GM8

Posted 03 June 2012 - 09:03 AM

Im making a space shooter game and i just made this shield but i want it to stay on the space ship there both separate objects so maybe you can make it follow the spaceship really fast it stays on it, someone please help
  • 0

#2 Jack Indie Box

Jack Indie Box

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:GM:Studio

Posted 03 June 2012 - 09:10 AM

//in shield obj
x=ship.x;
y=ship.y;


if this judders a bit in the step event try it in the end step or also set the vspeed and hspeed of shield from ship.vspeed ... which will help to stop it looking wrong
  • 0

#3 creators124

creators124

    awesomeliciousmember

  • GMC Member
  • 866 posts
  • Version:GM8

Posted 03 June 2012 - 09:12 AM

Im making a space shooter game and i just made this shield but i want it to stay on the space ship there both separate objects so maybe you can make it follow the spaceship really fast it stays on it, someone please help

what does the shield object do?!
if it does really little you could put it in the original space ship object! :P

also put this in the step event for that object(if you don't want to take my above tip):
x = object_spaceship_name.x // change the "object_spaceship_name" to you spaceship's name!
y = object_spaceship_name.y // same here
EDIT:
I GOT NINJA'D! Posted Image

Edited by creators124, 03 June 2012 - 09:13 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users