Make an actor flash on & off ?
InvisibleHam
Member Posts: 15
Hello all, hope everyone is doing great!
I was wondering if it's possible for an actor to be off screen but appear on screen for .1 seconds every 1 second?
Kind of like a flash that you see every second?
Hope this makes sense & thanks for any advice
Cheers
I was wondering if it's possible for an actor to be off screen but appear on screen for .1 seconds every 1 second?
Kind of like a flash that you see every second?
Hope this makes sense & thanks for any advice
Cheers
Comments
Would that be a 'Change Attribute' inside of a 'Timer' behavior?
I'm still feeling my way around, trying to learn what everything does.
I basically have a guy that I want the user to tap to defeat. Only, the user needs to tap at precise intervals (to a beat) so I was thinking of having a transparent actor 'appear' on top of the guy every 1 second (to the beat) and if the user taps on the transparent actor, they get +100 points, but if they tap the guy (while the transparent actor isn't on top of him) they get -100
does that make sense?
Thanks again!
Thanks and get some rest!
WHEN alpha=0, AFTER 1 sec, Change Attribute self.alpha to 1
WHEN alpha=1, AFTER 1 sec, Change Attribute self.alpha to 0
That should work.
Rule:
When self.color.alpha=1
-change attribute (self.fadein) to false
New rule:
When attribute (self.fadein) is false
-Interpolate self.color.alpha TO: 0
DURATION: 1
FUNCTION: LINEAR
New rule:
When attibute (self.color.alpha)=0
-change attribute (self.fadein) to true
New rule:
when attribute (Self.fadein) is true
Interpolate self.color.alpha to 1
DURATION: 1
fUNCTION: LINEAR
You could just use the same thing i posted but set the duration to to 0.1 or 0.001, etc depending on how fast you want the flash to be. It'll be going so fast that you cant notice its a fade, it would create a flashing effect
Could you tell me how to create attributes?
Also I'm totally open to any better ways to do this. Just think of a rhythm game: I need hits to land on beats and when a user taps off-beat they lose points.
The invisible actor flashing on and off was the first thing I thought of, since there obviously isn't any way for Gamesalad to recognize music files and detect rhythms :P
Thanks again I am away from GS for now but I will try these out soon & report back
Cheers!
A rythym game could be tough in GS... the timers aren't perfectly accurate and GS tends to stutter every now and then for no apparent reason.