Feature request: Destroy outside screen

Discussion and feedback on Construct 2

Post » Sun Apr 22, 2012 11:19 pm

I can emulate the Destroy outside screen behavior easily enough, but it would be nice to have an official behavior (while you're in the "small but many enhancements" phase - or is that phase over?)



Cheers!
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Mon Apr 23, 2012 1:08 am

do you mean like this http://www.scirra.com/manual/94/destroy-outside-layout

or outside the 'view' window?
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Mon Apr 23, 2012 7:11 am

I mean, destroy outside "view" window. Like:

Every tick
(inverted)Sprite->Is on screen
       :Sprite-Destroy
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Mon Apr 23, 2012 7:18 am

That behavior is designed for layout, not window, if you want to use your feature to make a platform game, the enemies are out of windows, so are destroyed now and you are walking... you see there no enemies.

Do you think it's an useful feature?
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Mon Apr 23, 2012 9:51 am

I'm using it in my games (as shown above) so yes it's useful, at least for me .

For example if you have a vertical shooter where your ship goes up and the scenery and enemies etc go down. There's a "tall" layout, and the player fires some bullets up. Those bullets can potentially go all the way up and kill the boss which is like 5 screens up and the player has not reached him yet. I would like the bullets to be destroyed outside screen (and I destroy them as shown above).

I know what the "Destroy outside layout" was designed for and I agree it is useful in many circumstances.

Geo
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Mon Apr 23, 2012 6:35 pm

I think this is not really widely useful... and considering you can emulate it with one event and one action... Ashley and Tom should probably focus on more important things for the moment.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Apr 23, 2012 8:32 pm

I disagree, the same can be said about "Destrouy outside layout" and in it makes a lot of sense in the case said.
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Mon Apr 23, 2012 8:33 pm

@geo,

i guess it could be useful in some situations, and since you solved it in such a quick and elegant way, it would probably be easy to implement as a behavior.

but if ash chose not to do so, for the reason @sqiddster stated, i would hope that you would make this 'method' a quick tutorial for other users. because it is a very nice way to solve this particular problem.
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Mon Apr 23, 2012 9:46 pm

@Harrio: You can use invert(is on screen) as Geo mentionned above.

You can also use "System: compare two values" and look for the distance between the player and the bullet. More than a certain distance, you consider that you have to delete the bullet.

Example capx.

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Apr 23, 2012 10:57 pm

[QUOTE=Kyatric] @Harrio: You can use invert(is on screen) as Geo mentionned above.

You can also use "System: compare two values" and look for the distance between the player and the bullet. More than a certain distance, you consider that you have to delete the bullet.

Example capx.

[/QUOTE]

Actually your event number 4 is better than number 3 because that number 3 isn't exactly get bullets destroyed out of the window, just a short range attack.

Anyways nice example!
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests