Replace All Feature?

Discussion and feedback on Construct 2

Post » Tue Nov 27, 2012 1:21 am

That'd be cool if there was a replace all feature. It would be useful for my example:

So I could copy all of one instance of Player, and replace player with Player2, player3, player4. Then find and replace all controls like so:

Find keypress W, replace with keypress Up Arrow


yea? Just an idea
B
32
S
4
Posts: 406
Reputation: 3,221

Post » Tue Nov 27, 2012 1:45 am

You shouldn't have to check a keypress more than once. Make a sheet called input, and include it in every layout. Then when W is pressed +1 to a variable, then you only have to check if the variable is higher than 0 this way you never have to replace input code that is scattered through the project.



If you want to see if a button is pressed just check if it equals 1:



if you want to see if the input is being held down check if its greater than 0:



(Though for my actual game I use keycode stuff so it can be customizable input.)
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Tue Nov 27, 2012 2:18 am

I see how that works! I would do global player1 input, player2 input etc. right?
But that still means I'd have to restructure my layout, which is what I could avoid with a replace button, you know?


Also, probably dumb question, but would adding that extra input check cause performance or memory issues, given that I have 10 or so different inputs, with up to 4 possible characters being played on screen?
B
32
S
4
Posts: 406
Reputation: 3,221

Post » Tue Nov 27, 2012 2:34 am

This proposed feature is actually on the to-do list, I believe, as it can be useful in many circumstances.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Tue Nov 27, 2012 4:22 am

oh awesome! thanks for letting me know!
B
32
S
4
Posts: 406
Reputation: 3,221


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests