Question: Is "s" available in sprite configs?

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
User avatar
duncan
Posts: 11
Joined: Sat Mar 19, 2005 2:56 pm
Location: San Francisco, CA

Question: Is "s" available in sprite configs?

Post by duncan »

Hi everyone,

What I am trying to do is create a sprite which flashes with the intensity of the beat of the song, so basically in my sprite's config file I would like to use something like:

abs( mag(s) )

as the "Pen" variable... and EPen I have set at around 0.5

However, when I try this, it doesn't seem to have any effect on the sprite... The sprite displays properly but the intensity seems to be constant... Perhaps it is just > 1 and so appears constant.... I've tried putting the expression into a B variable and then assigning the B var to Pen, like so:

B0=abs( mag(s)
Pen="B0"


but it still doesn't seem to work... Maybe I just need to tweak things a little more.

Can anyone tell me if this is at least functionally possible-- do sprite configs have access to the variable "s"?

Perhaps I need to include "Steps=..."?

Thanks all,

Duncan

User avatar
JayPro
Posts: 738
Joined: Sat May 01, 2004 10:51 pm
Location: Huntington Station, Long Island, New York

Post by JayPro »

Unfortunately, sprites can't behave that way. The only way they can be manipulated (IIRC) is via the duration time they stay on screen, whether they appear in the backround or foreground, and how they move about on screen.

It would, though, be an interesting thing-to-do to make sprites react the way you're describing it. IMO, the best way to do this is try to come up with an algorithm or whatever to make palettes sensitive, which of course is not possible now.
"God is syntax."

User avatar
duncan
Posts: 11
Joined: Sat Mar 19, 2005 2:56 pm
Location: San Francisco, CA

Post by duncan »

Thanks for your input Jay,

I fiddled with the config for about an hour before I decided that it wasn't going to be able to do what I wanted it to do... Seems like it wouldn't be too hard a thing to do, seeing as WaveShapes can access "s" already, and they are somewhat similar to sprites... I would imagine it would be a "constant-time" process, so ideally it wouldn't slow G Force down. I'll post this to Andy to see what he thinks... I think it really would be neeat to have sprites flash in time with the music.

happy coding/viewing everyone,

Duncan

Post Reply