Jump to content


Photo

change object following


  • Please log in to reply
2 replies to this topic

#1 chmu.wang

chmu.wang

    GMC Member

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

Posted 17 September 2012 - 08:13 AM

I want to change object following from A to B when an event was a trigger. And I don't know how to do. I will be appreciate if some one give me suggest.
  • 0

#2 Saintyboy

Saintyboy

    GMC Member

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

Posted 17 September 2012 - 09:35 AM

I assume you mean that you want to change an instance of an object and not the object itself?

To do this simply use this code in the object you want to destroy:

instance_create(x,y,obj_new). //creates new instance of another object at the same coords as old instance
Instance_destroy(). // deletes old object

You can also use the instance_change function or even do it in D&D using one of the icons

Changing an object is a little more different.
  • 0

#3 Pharrahnox

Pharrahnox

    GMC Member

  • GMC Member
  • 536 posts
  • Version:GM7

Posted 17 September 2012 - 10:36 AM

To achieve this in my games, I use a view_controller object, which follows the player at first, but when activated, it can move around by itself. Then it returns back to the player when deactivated. In this case, you would have the view following the view_controller.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users