A question about backgrounds

Birnbaum

Active member
I ´m planning to create some stages with effects for to move or change background or bglayers when the player reaches specific points on the level like these examples:

https://youtu.be/A3DDtLN-1PQ?t=14m52s

Between times 14m52s and 16m24s

The purple background changes horizontal direction to vertical when the player reaches the elevator, after kill the thugs the elevator stops and the background returns to horizontal direction and the player advance on the level.


https://youtu.be/lDbqyJJSJNo?t=4m57s
5m7s
Between times 4m57s and 5m07s the bridge explodes after player defeat thugs and the background changes the bridge image  to sewer entrance after player falls.

https://youtu.be/FX4Rf_DghKg?t=2m18s
Between times 2m18s and 2m29s the truck leaves warehouse and the background changes from static to a loop moving image.

My doubts are if these effects could be done on openbor.
If yes, I dont know how exactly it would be done but I have some ideas about.Maybe to try use levelscripts working on the level properties or something like entities under the main panel simulating effects for the background.
Could you give suggestions for how to solve this question?
Thanks in advance.
 
They can. You don't always have to use level scripts depending on the situation. I'll try and give you some details Monday.
 
I'm going to test some scripts to replicate the lift FX from Sonic Blastman video above. However, I can confirm that you can control horizontal bgspeed with script with this script:

Code:
      changelevelproperty("bgspeed", Speed);

Set speed to any value you like
I believe you can use same script to make truck leaving FX from Vendetta video

As for destroyed bridge FX from Rushing Beat Ran video, IMO it's only graphical trick. When bright flash appeared in the background, I believe that's when long sewer bg image is spawned to cover bridge background. The FX when you think player is falling is actually the bridge pillar moving up
For falling player FX, it can simply be done by running script to force player to play that animation

I'll be back after I'm done with my tests :)

[Two days later]

I'm back!! :D, back with good news

I've found a simply and neat trick to make moving lift FX above. All you need is to set this code:

Code:
    changelevelproperty("vbgspeed", 1);

Setting this with activate background autoscrolling and let it autoscroll vertically with speed of 1 i.e upwards
To ensure bglayer and fglayer autoscroll together with background, make sure to set last parameter to 1 like this:

bglayer data/bgs/elevatr2/back2.gif 0 -0.3 0 0 0 0 -1 -1 1 0 0 0 0 0 1
panel data/bgs/elevatr2/plat2.gif
fglayer data/bgs/elevatr2/front.png 10 0 -0.1 0 0 0 200 -1 -1 1 0 0 0 0 0 1

Example of setting the code is this:

wait
at 1000

group 1 1
at 0

spawn delay
@script
  void main()
  {
    changelevelproperty("vbgspeed", 1);
  }
@end_script
health  20
coords 160 190
at 0

group 2 2
at 0

spawn Caine
map 3
coords 400 190
at 0

spawn Caine
map 3
coords -80 190
at 0

group 1 1
at 0

spawn delay
@script
  void main()
  {
    changelevelproperty("vbgspeed", 0);
  }
@end_script
health  20
coords 160 190
at 0

group 100 100
at 0

After wait is activated at scrollpos 1000, background is autoscrolled then 2 Caines spawns. After both are defeated, background will stop autoscrolling and wait ends

You can change the script with this:

Code:
    changelevelproperty("bgspeed", 1);

to autoscroll horizontally. Use similar script to stop the autoscroll :)
 
Back
Top Bottom