How to replace objects in events

1

Stats

3,050 visits, 4,651 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 14 Mar, 2013. Last updated 19 Feb, 2019

Hi everybody, in this short tutorial I'm showing you my way of replacing objects inside events.

I know this is a long awaited feature and it's already in the "to-do" list of Construct2, and some people ask in the forums for an easy way to do this in the meantime.

This tutprial was made using version 117, not sure about newest releases.

The steps are very simple:

1. Select all the CONDITIONS, ACTIONS, or whole EVENTS that make reference to the object you want to replace... let's say OBJECT_1... and COPY them

2. Go to your layout and rename OBJECT_1 to anything else.

3. Select or create an instance of the "NEW" object and name it OBJECT_1.

4. Go back to your event sheet and simply paste all the code you copied before.

5. You will see that all the pasted code makes reference to the "NEW" OBJECT_1, and the previous code make reference to the "OLD" one, but with the name you gave it in step 2.

You can do this "COPY/RENAME/PASTE" trick to all the objects inside of an event, but remember that they have to be the same type of object.

You can try also if that works with Instance/Global variables.

You can watch a simple example of this in my Basic Fighting Game Tutorial

  • 0 Comments

Want to leave a comment? Login or Register an account!