A simple question? Would be

Discussion and feedback on Construct 2

Post » Mon Dec 26, 2011 9:32 pm

My game is working nicelly. But now Im creating a simple splash screen and Im stucked on it! Its really annoying bacause I cant do a simple object blink!!!!!!!!!!!!
See the pseudo code bellow (is what I need)

Every 1/2 of a second:
   some_object.visible = not some_object_visible

Its the only thing I need. I tryed to use Blink behavior and doest work. So I tried using events and does'nt worked. So, I want to know whats the sample form to acomplish a task like that. Thanks in advance.

Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Mon Dec 26, 2011 9:58 pm

You could always just adjust the object's opacity.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,845
Reputation: 48,291

Post » Mon Dec 26, 2011 10:03 pm

^this

+>Every 0.5 seconds sprite add to sprite.value("blink") 1
->sprite set opacity to sprite.value("blink")%2=0 ?0 :100
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Mon Dec 26, 2011 10:18 pm

hum.. nice solutions. Thanks a lot.
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Tue Dec 27, 2011 3:32 am

Why not use the Flash behavior?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Dec 27, 2011 6:16 am

^^^exactly what i was thinking
no need to go through events if you have handy behaviors

then again vinians you said "blink behavior does not work"
are you talking about the prebuilt flash behavior or the one that you are working on?
B
29
S
5
G
6
Posts: 58
Reputation: 5,121

Post » Tue Dec 27, 2011 12:59 pm

I tryed flash behaviour and doest worked... I ever try a premade behaviour beefore trying to create one by my self...
I dont know why its doest worked because its a simple sprite....
But anyway its working now using the miraculous "wait" ...
@Ashley:
You should allow us to set a boolean expression with our own expression, like when we set an integer. If so, we could use thing like:
visible = not visible, and even more complex expressions.
Thanks
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Tue Dec 27, 2011 4:17 pm

@Vinians can you post an example of the Flash behavior not working? Because it solves this problem perfectly and much more easily than the way you're trying to solve it, so we should fix that instead of your events...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Dec 27, 2011 4:33 pm

@Ashley This remembered me: Any chance of color tint support so that flash with color would be supported ? I know this would be trivial with WebGL but what about canvas ? Have you discovered any real time method for tinting ?
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Tue Dec 27, 2011 4:52 pm

@Ashley: Ok friend I will send the .CAPX to you.
Thanks!
Sended to you via PVT.Vinians2011-12-27 19:09:02
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Next

Return to Construct 2 General

Who is online

Users browsing this forum: erandi1984, Yahoo [Bot] and 11 guests