The Dink Network

Trouble with Brain 6

January 5th 2010, 06:06 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Brain 6 - as you should know is the 'Repeat' brain - is supposed to set a sequence to constantly repeat itself, correct? So here's the thing, when I create a sprite in game (using &variable = create_sprite(); ) and assign it a brain of 6 (either in the create_sprite(); or through sp_brain(); ) it does not work. It simply is a static sprite, with no animation. I place the same sprite in WDE and give it a brain of 6 in the properties panel, though, and it does work!

Anyone know what's up?
January 5th 2010, 06:17 AM
spike.gif
No idea. Brain 6 should animate just like that, without need for sp_seq(&sprite,##); like other brains. Are you positive it's not some stupid mistake, like a typo or a missing number?
January 5th 2010, 06:26 AM
pq_knight.gif
ExDeathEvn
Peasant He/Him New Zealand rumble
"Skinny Legend" 
Thats... weird
For me, I set a sprite to Brain 6 in WDE and it doesn't work and neither does the script
Edit: Okay, I don't actually know if it works in the script >_> Only tried to set it in WDE.
January 5th 2010, 06:29 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Hmm... No, no typo or missing numbers.

I just tested something. New screen, put a sprite on the screen. did this:
int &lol = create_sprite(300, 200, 6, 20, 1);

The sprite does not animate.
Then I did this:
int &lol = create_sprite(300, 200, 0, 20, 1);
sp_brain(&lol, 6);

Got nothing.
Even tried:
int &lol = create_sprite(300, 200, 6, 20, 1);
sp_brain(&lol, 6);

And still nothing!

And then I placed it in WDE, assigned brain 6 in the properties panel, and vuala! It works!

BTW, seq 20 has nothing special about it, just a random animation I picked.
January 5th 2010, 06:37 AM
spike.gif
What's the .ini line for those graphics?

Could also try adding a sp_seq(&lol,20); in there, who knows, maybe the engine is feeling cranky.

EDIT: I could also remember wrong, and it's actually necessary.
January 5th 2010, 06:41 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Well how about that... sp_seq(&lol, 20); did the trick.

Thanks scratcher.
January 5th 2010, 07:30 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Yes, you'll always need sp_seq() as well as the brain to have it function properly. Same thing for brain 7.
January 5th 2010, 04:24 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
But, one thing I don't quite understand: Why does it work in the editor? Simply setting the sprite to brain 6 in the properties panel?
January 5th 2010, 04:42 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
The sprite's hardness has to be 1 (soft).
January 6th 2010, 05:58 PM
knightg.gif
paladinemet
Peasant He/Him United States
The Truth is out there 
because the editor also automatically sets sp_seq