Jump to content


Photo

Make Multiple Objects Follow A Single View...


  • Please log in to reply
7 replies to this topic

#1 rokuken

rokuken

    GMC Member

  • New Member
  • 364 posts

Posted 07 November 2007 - 12:54 AM

I have a question I haven't seen in this forum. How can I make multiple objects to follow a single view. Answering this question will help me finish TOO many work-in-progress. Please help
  • 0

#2 Mnementh

Mnementh

    15151

  • Retired Staff
  • 6274 posts
  • Version:GM:Studio

Posted 07 November 2007 - 12:56 AM

Wait, you want the objects to follow the view? Are you sure it's not the other way arround, the view follows the objects?
  • 0

#3 rokuken

rokuken

    GMC Member

  • New Member
  • 364 posts

Posted 07 November 2007 - 12:58 AM

Yeah that, sorry. I want to make a view follow multiple objects.
  • 0

#4 Mnementh

Mnementh

    15151

  • Retired Staff
  • 6274 posts
  • Version:GM:Studio

Posted 07 November 2007 - 01:02 AM

ok. I suppose on way to do this would be to create ANOTHER object. The view follows that object. then, in the end step event of this object, you use this code

x=((obj1).x+(obj2).x)/2;
y=((obj1).y+(obj2).y)/2;

That would keep the view directly in between the two objects
  • 0

#5 rokuken

rokuken

    GMC Member

  • New Member
  • 364 posts

Posted 07 November 2007 - 01:10 AM

Ok, here's the thing.

I'm making a deathmatch game. Let's say that I put the view to follow an object running right. Then, when the character jumps in that direction, since the object changes to another one, the view doesn't follow it because it changed the object. How can I make this view to follow the two of them when they change objects.(It's a single object changing to different objects.
  • 0

#6 Mnementh

Mnementh

    15151

  • Retired Staff
  • 6274 posts
  • Version:GM:Studio

Posted 07 November 2007 - 01:18 AM

Ok, give the both a parent object. THe parent object can just be a blank object, nothing in it. Then, make th view follow the parent object.
  • 0

#7 weylin

weylin

    GMC Member

  • Banned Users
  • 1327 posts

Posted 07 November 2007 - 01:22 AM

I think he means like the super smash bros game, the screen fits around all the objects, and zooms in when they all get closer together.

#8 rokuken

rokuken

    GMC Member

  • New Member
  • 364 posts

Posted 07 November 2007 - 01:31 AM

Ok, so I make an invisible object, then make it a parent object for both of the objects I want the view to follow. And when the object changes to the other one, the view will still follow. Am I correct?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users