How do I batch change an name or object reference?

Get help using Construct 2

Post » Sun Aug 06, 2017 2:57 pm

I made a copy of an event sheet and made a Character2 variable, now I want to replace all mentions of Character1 in the copied sheet with Character2. I was doing this manually, but forgot to save and the backup file only goes back 20 mins. I am also thinking of using a family instead, but their moves are too different that I would end up doing the same amount of work.

Anyways, theres no option like in some word documents where you put "Search for all instances of word" and then use "Replace All instances with new word" to mass change a word in the document??
B
16
S
6
G
1
Posts: 45
Reputation: 1,831

Post » Mon Aug 07, 2017 11:25 am

As far as I understand it, there isn't a way to batch replace one variable for another, but if you're wanting to replace an object with another object:

Select all the events and actions with that object in it, right click on the selected code and select "Replace object".
You are offered the choice of which object to replace: Pick Character1 and then on the next window pick Character2 to swap.

This will only work if both objects are the same type and all the behaviours and variables for Character1 that are referenced in the selected code are also present on Character2.
B
16
S
7
G
3
Posts: 395
Reputation: 3,693


Return to How do I....?

Who is online

Users browsing this forum: mrkaio, Zav and 2 guests