Copy and Paste Sub-Events, Edit multiple actions/events

Just started using Construct 2? Post your questions here

Post » Sat Jan 23, 2016 2:55 am

For productivity reasons, i want to copy sub-events and paste them as such.
Now they become additional conditions.

And can i edit several selected actions, in this example to change them from castle to tree?
When i double click with both selected, it edits only the last selection.
When writing code, this would be easy, and also here it would save time - you would'nt have to do it for every single thing.
Image
B
2
Posts: 1
Reputation: 152

Post » Sat Jan 23, 2016 4:41 am

Depending on where you click in the event or action you will get different information highlighted, this allows you to copy/paste certain items easier.
If you click in the small empty area to the left of the condition (ie. System in above pic) you can select whole event.

Try right clicking and selecting change action or replace object, there are several options to allow choosing specific items in the event.

Also, I believe if you select multiple actions/events that have the same object and use right-click-replace-object it will replace all with the newly selected item.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
81
S
22
G
8
Posts: 664
Reputation: 10,333

Post » Sat Oct 28, 2017 8:02 pm

@chrisinfinger Any idea how I can change all the "full" values to "sand", or "grass" or well... anything else all at once? I fear I should of done it a cleaner way first time around and now I want to edit it I'm up a certain creek without a paddle!

(Its a 256x32x32 array, there's a lot more events with the exact same actions that need to be changed as well.... aprox 120ish)

Image
B
8
S
1
Posts: 12
Reputation: 374

Post » Sun Oct 29, 2017 3:14 am

@Aguamoose
Oh my goodness...
Why don't you add another sub-event under #101 and replace all those lines with this:
Code: Select all
For "offset" from 31 to 1
  Set value at (ArrayTilemapper.CurX, ArrayTilemapper.Yaxis+loopindex("offset"), ArrayTilemapper.Zaxis) to "Sand"


Also, you should use variables instead of fixed values.
If you put "Sand" in 10 events and tomorrow decide to replace it with "Grass", you'll need to edit 10 events.
If you add variable TerrainType="Sand" and use it in 10 events, you'll only need to edit 1 variable.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
156
Posts: 2,204
Reputation: 82,989

Post » Sun Oct 29, 2017 10:25 am

Good question @dop2000 How did I not see that lol >.< Thanks for all your help!
B
8
S
1
Posts: 12
Reputation: 374


Return to Beginner's Questions

Who is online

Users browsing this forum: nacra and 0 guests