make a sprite invisible

Get help using Construct 2

Post » Thu Dec 01, 2011 11:34 am

Hello,

I think its an easy thing, but some how its not working for me.

I have a sprite and a cave open from both sides.

I want the sprite to be invisible when its on collision with that cave and when the collision is finished the sprite will go visible again.

How can i do it?
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Thu Dec 01, 2011 11:43 am

system --> on start of layout. then click your sprite and set visibility to invisible
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Thu Dec 01, 2011 11:55 am

@ smitchell, Thats not what i want.

"I have a sprite and a cave open from both sides.
I want the sprite to be invisible when its on collision with that cave and when the collision is finished the sprite will go visible again."
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Thu Dec 01, 2011 12:00 pm

sprite is overlapping cave -> set visibility to invisble
[invert] sprite is overlapping cave -> set visibility to visible
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Dec 01, 2011 12:06 pm

Thanks Yann, I tried the on collision but there is no invert for it.

I thought the on overlapping is also without invert.

Thanks :)
B
303
S
6
G
5
Posts: 163
Reputation: 12,152

Post » Thu Dec 01, 2011 12:19 pm

There's no possible way to invert a collision because a collision is an instantaneous event, it's called a "trigger"
Instantaneous because it's true just in the tick it happens. Neither before nor after.

Maybe you can understand more about this concept looking at other triggers like "on animation finished", "on key pressed", etc.
They are all triggers.

To recognize a trigger amongst the other kind of condition (normal ones and loops) you can see that they have a green arrow on the left.

You can't invert a trigger.Yann2011-12-01 12:19:59
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Dec 01, 2011 12:21 pm

Thank u Yann, I really appreciate ur help.
B
303
S
6
G
5
Posts: 163
Reputation: 12,152


Return to How do I....?

Who is online

Users browsing this forum: SpartCrafter, Yahoo [Bot] and 23 guests