put a custom animated arrow to continue level

dcelso

Member
Hi, I'm trying to change the default arrow data/sriptes/arrow.gif for a custom animated arrow, I tried to change it for an animated gif. But works like a static gif, opens the last image. I want change the default location too.

I am searchig in the openbor manual and I dont find anything to do it. It is possble?

Is there any other alternative to do it? for example a custom item.
 
Hi, I'm trying to change the default arrow data/sriptes/arrow.gif for a custom animated arrow, I tried to change it for an animated gif. But works like a static gif, opens the last image. I want change the default location too.

I am searchig in the openbor manual and I dont find anything to do it. It is possble?

Is there any other alternative to do it? for example a custom item.


First, animated .gif is only for cut scenes, and even then it's supplanted with WebVM. You can never use animated .gif anywhere else, and in fact you shouldn't be using .gif at all. The recommended image format is .png.

As for the native arrow, it's pretty static. You can of course make any sort of arrow you want, but it will take a bit more work on your part. I recommend opening up Double Dragon Reloaded Alternate. It has a lot of climbing and backtracking with an arrow that points in various directions. You can see exactly how it works.

DC
 
If you really want custom animated arrow(s), you should create a blank image of arrow.gif/png in the sprites folder. Also, you can create arrows as entities with either type none or type panel.

Warning: Pay attention to lifespan (value) in the character header.

For example:
Code:
name    go
speed     10
type     Panel
shadow     0
lifespan   3
setlayer  300
antigravity      100
subject_to_wall  0
subject_to_obstacle 0
subject_to_platform 0
facing 1
alpha 4




anim    idle
    loop    1
    delay    100
    offset    36 25
    sound    data/sounds/arrow.wav
        frame    data/chars/misc/go.png
        delay   10
        frame    data/chars/misc/empty.png

In level, after the first group of enemies are defeated, add the custom arrow entity in there:

Code:
##### GROUP 1 ###########

scrollx 0 300
at  300

#group    1 1
#at    0

group   3 3
at  0

spawn    MalePur1
alias    Purifier
coords    350 218 76
at    5

spawn    FemPur
alias    Purifier
coords    350 218 76
at    30

spawn StroPur
alias Purifier
coords -90 218 76
item   RandItem
at   65

spawn FemPur
alias Purifier
coords -30 218 76
at 100

spawn GunPur1
alias Purifier
coords 350 218 76
at 160

spawn GunPur1
alias Purifier
coords -30 218 76
at 210

spawn StroPur2
alias Purifier
coords 350 218 76
item   RandItem
at 280

group 1 1
at    300

group 100 100 #For spawning enemies normally without grouping
at    300

#wait
#at 300

##### GROUP 2 ########

scrollx 300 700
at  300

group   100 100
at 300

spawn   go
coords   300 190 76
at   305


spawn    MalePur2
alias    Purifier
coords    350 218 76
at      380

spawn  box
alias  box
coords 325 218 76
item   RandItem
at     390

spawn  box
alias  box
coords 325 218 76
item   RandItem
at     412

spawn  FemPur2
alias  Purifier
coords -30 218 76
at      410

spawn  StroPur2
alias  Purifer
coords 350 218 76
item   RandItem
at     460

spawn  StroPur
alias  Purifier
coords -30 218 76
item   RandItem
at     500

spawn FemPur3
alias Purifier
coords 340 218 76
at    510


spawn spikes2
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 890);
}
@end_script
alias spikes
coords 321 218
at 569

spawn  box
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 922);
}
@end_script
alias  box
coords 322 218
item   RandItem
at     600


spawn spikes2
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 957);
}
@end_script
alias spikes
coords 321 218
at 636

spawn SGunPur
alias Purifier
coords 325 218 76
at    670
 
First, animated .gif is only for cut scenes, and even then it's supplanted with WebVM. You can never use animated .gif anywhere else, and in fact you shouldn't be using .gif at all. The recommended image format is .png.

As for the native arrow, it's pretty static. You can of course make any sort of arrow you want, but it will take a bit more work on your part. I recommend opening up Double Dragon Reloaded Alternate. It has a lot of climbing and backtracking with an arrow that points in various directions. You can see exactly how it works.

DC
ok, thanks. I will keep in mind.

Anyway I tried to use arrow.png instead of arrow.gif but it did not work, the game did not show anything.
I have another problem related with this hardcoded resource names.

remix.bor, I deleted it, because I dont want music at start. but "can not open remix.bor" is always written in the log file. Same problem if I delete gameover.bor

May be better that the code check if exists it before of try to use them, and avoid that the log throws that warning. :)
 
If you really want custom animated arrow(s), you should create a blank image of arrow.gif/png in the sprites folder. Also, you can create arrows as entities with either type none or type panel.

Warning: Pay attention to lifespan (value) in the character header.

For example:
Code:
name    go
speed     10
type     Panel
shadow     0
lifespan   3
setlayer  300
antigravity      100
subject_to_wall  0
subject_to_obstacle 0
subject_to_platform 0
facing 1
alpha 4




anim    idle
    loop    1
    delay    100
    offset    36 25
    sound    data/sounds/arrow.wav
        frame    data/chars/misc/go.png
        delay   10
        frame    data/chars/misc/empty.png

In level, after the first group of enemies are defeated, add the custom arrow entity in there:

Code:
##### GROUP 1 ###########

scrollx 0 300
at  300

#group    1 1
#at    0

group   3 3
at  0

spawn    MalePur1
alias    Purifier
coords    350 218 76
at    5

spawn    FemPur
alias    Purifier
coords    350 218 76
at    30

spawn StroPur
alias Purifier
coords -90 218 76
item   RandItem
at   65

spawn FemPur
alias Purifier
coords -30 218 76
at 100

spawn GunPur1
alias Purifier
coords 350 218 76
at 160

spawn GunPur1
alias Purifier
coords -30 218 76
at 210

spawn StroPur2
alias Purifier
coords 350 218 76
item   RandItem
at 280

group 1 1
at    300

group 100 100 #For spawning enemies normally without grouping
at    300

#wait
#at 300

##### GROUP 2 ########

scrollx 300 700
at  300

group   100 100
at 300

spawn   go
coords   300 190 76
at   305


spawn    MalePur2
alias    Purifier
coords    350 218 76
at      380

spawn  box
alias  box
coords 325 218 76
item   RandItem
at     390

spawn  box
alias  box
coords 325 218 76
item   RandItem
at     412

spawn  FemPur2
alias  Purifier
coords -30 218 76
at      410

spawn  StroPur2
alias  Purifer
coords 350 218 76
item   RandItem
at     460

spawn  StroPur
alias  Purifier
coords -30 218 76
item   RandItem
at     500

spawn FemPur3
alias Purifier
coords 340 218 76
at    510


spawn spikes2
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 890);
}
@end_script
alias spikes
coords 321 218
at 569

spawn  box
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 922);
}
@end_script
alias  box
coords 322 218
item   RandItem
at     600


spawn spikes2
#@script
void main(){
void self = getlocalvar("self");
changeentityproperty(self, "position", 957);
}
@end_script
alias spikes
coords 321 218
at 636

spawn SGunPur
alias Purifier
coords 325 218 76
at    670
Good alternative, but Could I show that arrow when the original arrow.gif does it?
 
May be better that the code check if exists it before of try to use them, and avoid that the log throws that warning. :)
There's a reason those log alerts and hard coded items are in place.

Just make a blank file with notepad and change its extension to .bor. This will silence the log without playing anything. You can use same technique for hard coded sound effects.

DC
 
Good alternative, but Could I show that arrow when the original arrow.gif does it?
Yes, because every time you finish defeating a group of enemies in one round and you move on, that arrow.gif/png is always gonna be there. You should not delete arrow(.gif/.png) from the sprites folder. By the way, I just realized it's type panel, not type none.

I put this in case somebody will attempt to use direction left/rightleft or right/leftright/both in the level.

Example:
Code:
wait
at    0

group    1 1
at    0

spawn    Dummy # enemy 1 / spawn 1
coords    -30 230
at    0

spawn arrowR # spawn 2
coords 240 180 0
at 0


wait
at 200

group    1 4
at    200

spawn    Buntaro # enemy 1 / spawn 1
map    2
coords    330 200
at    200

spawn    Shintaro # enemy 2 / spawn 2
map    1
health 135
coords    -9 190
at    200

spawn    Olof # enemy 3 / spawn 3
map    1
coords    -4 229
at    200

spawn    Chinnen # enemy 4 / spawn 4
health 145
coords    512 188
at    200

spawn arrowR / spawn 5
coords 240 180 40
at 200


wait
at 500

group    1 4
at    500

spawn    Flogger
coords    344 210
at    500

spawn    Chinnen
coords    323 188
at    500

spawn    Iggy
map    1
coords    330 200
at    500

spawn    Eagle
health    140
coords    330 191
at    500
 
Back
Top Bottom