dantedevil
Well-known member
I have a rare problem with weapons and can't find wath happend.
Here the problem:
I create the 1rst weapon "bat".
The create the bat in Carolina, caro1.
Header Carolina:
Header caro1:
Then add this wepon to an enemy.
Enemy head:
Enemy with wepon head:
In game:
1) Carolina start a level
2) Take the bat of the floor
3) Lose the bat after hit
4) Enemy takes the bat
5) Carolina attack anemy
6) Enemy lose the bat
7) bat fall on the floor again
This works ok.
Here the bug:
1) Carolina start a level
2) Enemy take the bat of the floor
3) Carolina attack the enemy
4) Enemy lose the bat after hit, but the bat dissapear and never fall on the floor.
I can't understand why.
The weapons are new to me, so I think miss something.
Here the problem:
I create the 1rst weapon "bat".
Code:
name Bat
health 0
type item
counter 9999
subtype weapon
weapnum 1
nolife 1
antigravity 20
offscreenkill 3000
script data/scripts/bounce.c
animationscript data/scripts/itemsp.c
anim idle
loop 0
offset 100 177
bbox 77 463 50 15
frame data/chars/misc/weapons/bat.png
anim spawn
loop 0
offset 100 177
bbox 77 463 50 15
frame data/chars/misc/weapons/bat.png
anim respawn
loop 0
delay 12
offset 100 177
jumpframe 0 2 0.5
landframe 4
@cmd move 25 0 20
@cmd antiwall4 0 -25
frame data/chars/misc/weapons/bat1.png
frame data/chars/misc/weapons/bat1.png
frame data/chars/misc/weapons/bat2.png
delay 100
frame data/chars/misc/weapons/bat2.png
sound data/sounds/weapfall.wav
delay 8
bbox 77 463 50 15
frame data/chars/misc/weapons/bat.png
frame data/chars/misc/weapons/bat.png
Header Carolina:
Code:
name CAROLINA
health 100
speed 10
type player
grabdistance 30
gfxshadow 1
holdblock 1
bflash block
hmap 1 2
fmap 2
mp 100
mprate 2
dust dust
risetime 100
projectilehit player obstacle
falldie 2
makeinv 2 1
weapons CARO1 CAROLINA
Code:
name CARO1
health 100
speed 10
type none
grabdistance 30
gfxshadow 1
holdblock 1
bflash block
hmap 1 2
fmap 2
mp 100
mprate 2
atchain 1 2
weaploss 0
typeshot 1
weaploss 0
modelflag 1
Enemy head:
Code:
name BD4
health 70
speed 9
type enemy
grabdistance 45
risetime -200 -200
gfxshadow 1
blockodds 6
thold 19
aggression -30
bflash block
falldie 2
projectilehit enemy obstacle
dust dust
fmap 2
aimove Chasez
load BD41
weapons BD41 BD4
Code:
name BD41
health 70
speed 9
type none
grabdistance 45
risetime -200 -200
gfxshadow 1
aggression 1
dust dust
fmap 2
aimove Chasez
weaploss 0
typeshot 1
weaploss 0
modelflag 1
In game:
1) Carolina start a level
2) Take the bat of the floor
3) Lose the bat after hit
4) Enemy takes the bat
5) Carolina attack anemy
6) Enemy lose the bat
7) bat fall on the floor again
This works ok.
Here the bug:
1) Carolina start a level
2) Enemy take the bat of the floor
3) Carolina attack the enemy
4) Enemy lose the bat after hit, but the bat dissapear and never fall on the floor.
I can't understand why.
The weapons are new to me, so I think miss something.