Cycle actor colour over and over like a rainbow effect
Hi guys
I am trying to get an actor who floats onscreen from the left to change colour every second.
It's main colour is red and I thought the below idea might have worked but it doesn't
![image](/home/leaving?target=http%3A%2F%2Fimg850.imageshack.us%2Fimg850%2F6436%2Fscr01.png)
That doesn't make any difference...thought it might make the colours cycle through...![:( :(](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/frown.png)
Does anyone else have any other ideas?
Many thanks
ZB
I am trying to get an actor who floats onscreen from the left to change colour every second.
It's main colour is red and I thought the below idea might have worked but it doesn't
![image](/home/leaving?target=http%3A%2F%2Fimg850.imageshack.us%2Fimg850%2F6436%2Fscr01.png)
That doesn't make any difference...thought it might make the colours cycle through...
![:( :(](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/frown.png)
Does anyone else have any other ideas?
Many thanks
ZB
It takes a Zombie to know a Zombie!!!
Comments
Red is on - animate blue up - green is off
animate red down - blue is on - green is off
Red is off - blue is on - animate green up
Red is off - animate blue down - green is on
animate red up - blue is off - green is on
Red is on - blue is off - animate green down
Rinse and repeat . . .
I am sure you could simply write some math magic to do it for you, probably just three constrain behaviours, no need for a timer . . . .
Let me have a go . . . back shortly
No, a random effect would cool...
It takes a Zombie to know a Zombie!!!
I rainbow effect would be cool too...
It takes a Zombie to know a Zombie!!!
Constrain Red to (sin(time*300)/2)+0.5
Constrain Blue to (sin((time*300)+150)/2)+0.5
Constrain Green to (sin((time*300)+300)/2)+0.5
The first 300 number is the speed at which you cycle through the rainbow.
Actually, hold on a second . . . let me try it in Gamesalad to see if it actually works !!!
Here you go:
http://www.mediafire.com/?09mnntti8fk69bd
that is the actor that is spawned … the Red-Man
darn computer is so smart … and can't even figure out what we mean! @-)
@};- MH
EDIT: aha! @Tynan … another beautiful and fascinating creation!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Same here, never gave it much attention until I started to learn Gamesalad, sine and cosine are pretty simple things and quite useful.
That's amazing work dude and thanks so much for taking the time to work the slick s*%t out!
It takes a Zombie to know a Zombie!!!
problems in getting the hang of Trigonometry is due to your teachers' giving you a bunch of new terms without anything to hang them on!
sine (sin); cosine(cos); tangent (tan); theta; adjacent; opposite; secant; cosecant; cotangent …
while your brain already knows that sin is evil; cos might be slang for because; tan is what you do at the beach; adjacent means next to; opposite mean across the street; and the rest of them are gibberish! … and though your brain knows that a clockwise goes to the right … how come in trig the angle theta is drawn counterclockwise?
note: in the new College Trig class by HAAC (free in iTunes U) the professor does away with adjacent/opposite and uses X,Y … =D>
failure to learn is often the result of failure to teach … and Trig is easier to grasp, if your native tongue isn't English!
@};- MH
"That's amazing work dude and thanks so much for taking the time to work the slick s*%t out!"
No problems, I only want 65% of the revenue from your games by way of a thank you (Apple take 30% so I thought I would leave you something).
while your brain already knows that sin is evil; cos might be slang for because; tan is what you do at the beach; adjacent means next to; opposite mean across the street; and the rest of them are gibberish! … and though your brain knows that a clockwise goes to the right … how come in trig the angle theta is drawn counterclockwise?
Yep, all the gibberish and esoterica kills any chance of getting a handle on all that crap.
I like to think of sin as a value that moves from -1 to +1 to -1 to +1 ( . . . . etc and so on) - that's all you need to know to make circles and weird squiggly shapes.
Well, I wouldn't say that, some days, but thanks all the same, MH!!! :-)
@Tynan, hi, I downloaded your rainbow 5 game salad file when the link was there; I think it's terrific; the link is now gone, I guess you've changed your mind about making it freely available (which is fair enough)
I have a project that's been simmering for a while now that I keep tinkering with - it'll see the light of day one day - anyhow, I've already got permission from Ludwig to use his algorithms from his pattern generator; your rules/algorythm in the rainbow 5 game file would be perfect as well. Would you give me permission to use it please? If not, I'll understand but if you do I'll gladly put your name (and a website reference if wanted) in the credits. For info, it wouldn't be a major part of the app, just another visual effect amongst the many others (but an excellent one all the same!) :-)
Only one thing, this simmering project will have to simmer for quite a while longer before its anywhere finished...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Not at all ! 8-X
Haha! :-)
@Tynan wrote: "it's only a move and a rotate"
Ah yes, but it includes that dreaded trigonometry stuff that my math(s) teacher couldn't get through to me into my head (all those years ago....) ;-)
Most kind of you Tynan, thank you for use of! I've already had a tinker ....... there's a joke there somewhere ..... of your game file, it's interesting to see all the variations. Thanks again! :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
It really is simple, here's a simple way of viewing 'sin'.
Sin is a value that simply goes from -1 to +1 then back to -1 and back and forth forever. That's all it does.
Plus makes things bigger, minus makes things smaller, divide chops stuff into smaller pieces, sin makes things bigger then smaller then bigger then smaller (etc).
So once you have something that oscillates back and forth like that you can use it to move a ball left and right or up and down or get an object to fade in and out and so on - you can decide how fast you want it to move back and forth and how far back and forth it goes.
Thanks for your explanation, that sounds straightforward enough.... I've had it in my head all these years that sin, cosine etc are to do with tangents which are to do with vectors.... etc., you know, distances and angles and arcs; I got it wrong way back then and have been in the dark... until now!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
My face, not my beautiful face, go for the flanks.
" I've had it in my head all these years that sin, cosine etc are to do with tangents which are to do with vectors.... etc"
Well strictly speaking they are really to do with triangles and related stuff, but the above way of viewing them (a value moving back and forth between -1 and +1) is a more useful way of thinking about them.
If you keep adding 1 to the value that controls an object's X position, it will move in the X direction as you continue adding 1.
If you keep adding 1 to the value of 'sin' and, it is controlling the object's X position, it will move 1 unit to the right and then 1 unit to the left (and so on) as you continue adding 1.
is it possible that you cold provide a new link to your rainbow color cycling solution as the link you gave earlier ( http://www.mediafire.com/?09mnntti8fk69bd ) dosent work any more.
Thank you in advance.
AUM
Any chance you might be able to post a link or a screen shot of your code for your rainbow color cycling solution? You gave a link but sadly, it doesn't work anymore.
Thanks so much!
RD2012
Labelled Color Blocks on the right!