How do I disable a layer and reenable it in game?

Get help using Construct 2

Post » Mon Mar 23, 2015 10:25 pm

Let's say, I have 3 text objects in a layer. When a button is pressed, these objects get invisible, but they remain touchable, which makes the mouse change if hovered over them. How can I make this layer disabled while it's objects are invisible? Or how do I make the text become untouchable and unclickable while invisible? If it was a sprite would disable colision for them, but text objects do not have this kind of action.
B
8
S
2
Posts: 110
Reputation: 923

Post » Mon Mar 23, 2015 10:31 pm

Mouse is over object -> set cursor

And you can add conditions, like is over object, and invert it. (!not over object)
Who dares wins
B
53
S
13
G
11
Posts: 1,757
Reputation: 13,828

Post » Mon Mar 23, 2015 11:08 pm

No, i guess I introduced my question not correctly. What i need, is to be able somehow, when specific text objects are set invisible by a certain action, so that they become unactive, until another command puts them visible. I am asking for a way to temporarly disable/deactivate a layer or at list a text object or a family of text objects.
My problem is, that when they are invisible, sometimes you pass with the mouse over them, and you can see the mouse changing as if they where there. And they are clickable, and the player can accidentally click on them, while they are invisible.
B
8
S
2
Posts: 110
Reputation: 923

Post » Mon Mar 23, 2015 11:37 pm

You can add that in events ...

This makes it only clickable when visible

event
On click object
obect is visible
action
etc


Force some cursor when mouse over

event
on mouse over object
object is visible (inverted)
action
set cursor to default
Who dares wins
B
53
S
13
G
11
Posts: 1,757
Reputation: 13,828

Post » Mon Mar 23, 2015 11:57 pm

I am very thankful for your answers!
But, I am not sure i could completely figure out what your first part means:

"This makes it only clickable when visible

event
On click object
obect is visible
action
etc"

This is the most important thing I need to realize. The part with mouse view I fixed. What exactly stands for " etc" in your above example? I am trying to build this kind of event...
B
8
S
2
Posts: 110
Reputation: 923

Post » Tue Mar 24, 2015 11:40 am

anybody?...
B
8
S
2
Posts: 110
Reputation: 923

Post » Tue Mar 24, 2015 11:53 am

The etc, was referring to actions you could be doing there ....


Event
On click/touch object
Object is visible (this is an event option for objects, indicating they need to be visible)
action
Do something with the clicked, visible, object
Who dares wins
B
53
S
13
G
11
Posts: 1,757
Reputation: 13,828

Post » Tue Mar 24, 2015 12:02 pm

I have it setup already, for a long time, and have events to make this object invisible, and visible again. But I cannot find anywhere on the forum a way to simply make such an object inactive, disabled, whatever beter way to call this process. I know how to make them visible and invisible, by even pressing the same button. I am just searching how to make them unclickable...
For example, for sprites, it is possible to disable collision, as action. For Other object types, is possible to make them enabled/disabled. What action will be good to make a text disabled/ inactive/unclickable as Action?
B
8
S
2
Posts: 110
Reputation: 923

Post » Tue Mar 24, 2015 12:05 pm

In my event ... I do not set it visible or invisible ...

The event CHECKS if the object is visible when you clicked it ... if its invisible .. the action will not run. If its visible ... it will perform the action.
Who dares wins
B
53
S
13
G
11
Posts: 1,757
Reputation: 13,828

Post » Tue Mar 24, 2015 2:37 pm

Message: MangoPolo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
here is an example of what I have. and even if I make the mouse not change over Objects 1 and 2 while they are invisible, if accidentally clicked, their action will happen. how do I make them not clickable at all while invisible? even if the mouse doesn't show it has changed over them. they are still clickable...
here's a capx

www.drive.google . com/file/d/0B09lLdP7JoIAZlh3SmVVZklJT00/view?usp=sharing
remove the space before .COM
B
8
S
2
Posts: 110
Reputation: 923

Next

Return to How do I....?

Who is online

Users browsing this forum: AekiroStudio, Rotgut and 9 guests