Animating a front panel

DJGameFreakTheIguana

Active member
It's been a while guys.  ;)

So, I'm working on this Sonic game I made for a forum, and I plan on backgrounds from different stages to make Toxic Cave from Sonic Spinball:
http://imageshack.us/photo/my-images/96/toxiccavesconcept.png/
^That's only an example

Anyway, I want to animate two rows of oil, one behind and one in front of the pillars, but I've been wonder what would be the best to animate that since I would have to set it as a front panel, cause I wouldn't know how to work it as a type panel entity cause it would need to move.

I did just get these ideas in my head that might work though:
I can, A: Copy and paste the the bottom of the panel as a background, or B: make the whole panel another background that moves at the speed of a panel. The only problem I can see from that is if OpenBOR is updated again and the BGLayer order is changed again, cause I had to make some changes in layer order because of that back on Sega Brawlers.

Anyone think any of these options will work or are there better ideas for me to go with?

x)
 
Use this:

Code:
Name   HUD_panel
type     panel
speed   -15 
facing   1
setlayer 2000
noquake 0 1


anim	idle
	loop	 0
	delay 	5
	offset	1 1
	frame	data/sprites/main.pcx
	frame	data/sprites/main2.pcx

The negative speed will make it follow the screen. Speed 5 sitcks with the background, speed 10 sticks with the panel (ie no scroll) and 15 will stick with foreground.

But you need to use a negative value, or it will move to the other direction.

The second value at noquake will make it ignore quakes and rock effects
 
Yeah, but the thing is, I want it to move on it's own, like when you set BGSpeed(maybe I should've chosen my words better), that kind of animation. I basically want this to flow like water, so setting it as a panel, I'd have to spawn it many times for it not to run out during gameplay, assuming the player doesn't stay there long enough.

x)
 
I believe you should do as Ilu suggested. I'm not really sure on how these oil works but I believe it's just animating water.

As for spawning more of these to avoid running out of them, it can't be helped. The best you can do is to make longer version of animated oil so you only need to spawn one or 2 of it. Don't forget to set offscreenkill though.
 
I guess I could just add "move x" to a large panel and Spawn them close by, I just don't wanna risk players standing there too long for it to run out, but it's not suppose to be a very long stage anyway......

Or, I could just make the oil move back and forth. Dammit, wish I came up with that idea sooner... either way, yeah, better spawn it as a panel.

x)
 
Sorry, I worded that wrong. I really just want it to scroll, as if you're setting a BGSpeed in a level's txt file, but I want one of the rows of oil to be in front of the pillars, but doing this is still the best option, I'll just have to spawn the oil right next to each other.

x)
 
Will the oil be animated or just static image moving on its own?

If it's the latter you can use a trick to autoscroll bglayer and fglayer without moving background. If it's the former you might need a spawner which constantly spawns the animated oil.
 
I'm not at home ATM but here's what I can get from my Flash Drive

background data/bgs/swamp/bg.gif
bglayer data/bgs/swamp/bg.gif 0 0 0 0 0 0 -1 1 1 0 0 0 0 0 0
panel data/bgs/swamp/panel.gif
fglayer data/bgs/swamp/mist.png 10 0 0 0 -70 0 0 -1 1 1 1 0 0 0 0 -0.7
fglayer data/bgs/swamp/mist2.png 12 0 0 0 -50 0 0 -1 1 1 1 0 0 0 0 -1.05
fglayer data/bgs/swamp/mist.png 14 0 0 0 30 0 0 -1 1 1 1 0 0 0 0 -1.4
bgspeed 1

This is how I set moving mists in swamp level.
As you can see there's bgspeed set and all fglayers has relative speed parameter set. But there's also a clone of background set with bglayer with relative speed parameter set to 0.
With this settings, mists in front of players will autoscroll together with background HOWEVER since there's a clone of background in front of real background, we can't see real background autoscrolling. Instead we see the clone one giving impression that background is not moving at all.

Same trick can be used to make moving clouds in back.
 
Back
Top Bottom