How do I disable wrap behavior for some time?

Get help using Construct 2

Post » Mon Dec 21, 2015 12:44 pm

Hi, I want to have wrap behavior disabled in some layouts, but not in every layout. I don't see any option how to disable it? Is there any way to do so?
B
3
Posts: 7
Reputation: 189

Post » Mon Dec 21, 2015 12:57 pm

You could use the action

player set x : clamp(player.x,0,layoutwidth)

When you don't want the player to wrap..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Dec 21, 2015 1:00 pm

You can't, but you can still use 'out of layout' or 'on screen' or negate 'is not on screen'. So if you want to destroy your sprite when its outside the layout/viewport you could use:

Sprite| is outside layout-> sprite| destory
Sprite|X is on screen -> sprite| destroy

or anything you like to do.
B
24
S
3
G
1
Posts: 432
Reputation: 2,127

Post » Mon Dec 21, 2015 1:03 pm

Ok, thanks for answer. I will try it.
B
3
Posts: 7
Reputation: 189

Post » Mon Dec 21, 2015 1:14 pm

Problem. When I set "Is outside layout" than "Destroy" it will wrap to top of the layout anyway before destroyin' itself. :(
B
3
Posts: 7
Reputation: 189

Post » Mon Dec 21, 2015 1:25 pm

Works for me. Here a little example:
https://drive.google.com/file/d/0B5FlDY ... sp=sharing
B
24
S
3
G
1
Posts: 432
Reputation: 2,127

Post » Mon Dec 21, 2015 1:28 pm

Oh yeah. I set it wrong. Now it works. Thanks everyone. :)
B
3
Posts: 7
Reputation: 189

Post » Fri Jan 08, 2016 4:17 am

@Ashley Would be nice and useful to be able to activate and deactivate most behaviours.
B
26
S
9
G
2
Posts: 78
Reputation: 2,524

Post » Thu Apr 28, 2016 8:36 am

When you spawn objects with Wrap outside of the layout they just stay at the edge. An action to enable/disable it would be great.
B
53
S
16
G
6
Posts: 718
Reputation: 9,150


Return to How do I....?

Who is online

Users browsing this forum: BlueGuy3, ColombageEnPLS, FlyingRam, plinkie, Yahoo [Bot] and 3 guests