Boss doesn't shoot the magic

Dyhego

Member
Hello everyone!

I have a problem that I can't solve at all. The Chief does not fire the magic. When I used an earlier animation it was normal, but after I changed it doesn't trigger the magic anymore.

Special and Special2 in none it fires the magic
Code:
name	Egg_Head
health 400
mp      250
speed 16
type	enemy
shadow	   0
diesound data/chars/egg_head/death.wav
escapehits 3
nolife 1
lifebarstatus 200 10
lifeposition 60 215
nameposition 127 203
knife ray1
knife ray2

anim	attack
	delay	9
	bbox	14 6 31 100
	offset	32 104
	frame	data/chars/egg_head/a01.gif
	attack	53 16 19 26 30 0 0 0 0 0
	offset	26 101
	frame	data/chars/egg_head/a02.gif
		
anim	attack2
	delay	10
	bbox	11 8 37 102
	offset	29 105
	frame	data/chars/egg_head/a03.gif
	offset	24 101
	frame	data/chars/egg_head/a04.gif
	delay	18
	attack	66 10 28 26 30 0 0 0 0 0
	bbox	12 7 47 78
	offset	38 81
	frame	data/chars/egg_head/a05.gif
	attack	0 0 0 0 0 0 0 0 0 0
	offset	35 92
	frame	data/chars/egg_head/a06.gif
		
anim	attack3
	delay	10
	bbox	30 7 27 84
	offset	43 93
	frame	data/chars/egg_head/a07.gif
	bbox	16 12 29 84
	offset	20 94
	frame	data/chars/egg_head/a08.gif
	delay	18
	blast	59 7 25 32 30 0 0 0 0 0
	bbox	15 8 40 72
	offset	18 80
	frame	data/chars/egg_head/a09.gif
		
anim	death
	offset	37 88
	frame	data/chars/egg_head/d01.gif
		
anim	fall
	delay	12
	offset	37 94
	frame	data/chars/egg_head/f01.gif
	frame	data/chars/egg_head/f02.gif
	frame	data/chars/egg_head/f03.gif
	frame	data/chars/egg_head/f04.gif
	offset	37 88
	frame	data/chars/egg_head/d01.gif
		
anim	idle
	loop	1
	delay	11
	bbox	14 8 47 96
	offset	35 99
	frame	data/chars/egg_head/i01.gif
	offset	28 99
	frame	data/chars/egg_head/i02.gif
	offset	30 99
	frame	data/chars/egg_head/i03.gif
	offset	26 99
	frame	data/chars/egg_head/i04.gif
	offset	29 99
	frame	data/chars/egg_head/i05.gif
	offset	27 99
	frame	data/chars/egg_head/i06.gif
	frame	data/chars/egg_head/i07.gif
	offset	24 99
	frame	data/chars/egg_head/i08.gif
		
anim	pain
	delay	10
	bbox	13 10 34 86
	offset	27 94
	frame	data/chars/egg_head/p01.gif
	delay	10
	frame	data/chars/egg_head/p02.gif
	delay	10
	frame	data/chars/egg_head/p01.gif
	delay	30
	frame	data/chars/egg_head/p02.gif
		
anim	rise
	delay	14
	offset	34 63
	frame	data/chars/egg_head/r01.gif
	offset	25 62
	frame	data/chars/egg_head/r02.gif
	offset	27 88
	frame	data/chars/egg_head/r03.gif
		
anim	special
	custknife	ray1
	throwframe	3 -1
	energycost	25
	mponly	1
	delay	20
	offset	32 130
	sound	data/chars/egg_head/special.wav
	frame	data/chars/egg_head/s01.gif
	delay	20
	offset	40 91
	frame	data/chars/egg_head/s02.gif
	delay	14
	offset	61 132
	frame	data/chars/egg_head/s03.gif
		
anim	special2
	custknife	ray2
	throwframe	3 -1
	energycost	25
	mponly	1
	delay	20
	offset	32 130
	sound	data/chars/egg_head/special.wav
	frame	data/chars/egg_head/s01.gif
	delay	20
	offset	40 91
	frame	data/chars/egg_head/s02.gif
	delay	14
	offset	61 132
	frame	data/chars/egg_head/s03.gif
		
anim	walk
	loop	1
	delay	12
	bbox	10 4 37 101
	offset	28 99
	frame	data/chars/egg_head/w01.gif
	frame	data/chars/egg_head/w02.gif
	frame	data/chars/egg_head/w03.gif
	frame	data/chars/egg_head/w04.gif
		
#|edited by openBor Stats v 0.67

Ray1
Code:
name	ray1
type none
health 	1
speed	15
gfxshadow	1




anim	idle
	delay	11
	blast	6 11 45 46 70 0 0 0 0 0
	offset	7 53
	frame	data/chars/egg_head/ray01.gif
	blast	0 0 0 0 0 0 0 0 0 0
	frame	data/chars/egg_head/ray02.gif
	blast	6 11 45 46 70 0 0 0 0 0
	frame	data/chars/egg_head/ray01.gif
	blast	0 0 0 0 0 0 0 0 0 0
	frame	data/chars/egg_head/ray02.gif
		
#|edited by openBor Stats v 0.67

Ray2
Code:
name	ray2
type none
health 	1
speed	15
gfxshadow	1


alpha	1

candamage	enemy obstacle


anim	idle
	delay	13
	blast	8 13 49 72 100 0 0 0 0 0
	offset	10 82
	frame	data/chars/egg_head/ray03.gif
	blast	0 0 0 0 0 0 0 0 0 0
	frame	data/chars/egg_head/ray04.gif
	blast	8 13 49 72 100 0 0 0 0 0
	frame	data/chars/egg_head/ray03.gif
	blast	0 0 0 0 0 0 0 0 0 0
	frame	data/chars/egg_head/ray04.gif
		
#|edited by openBor Stats v 0.67

 
I can't be wrong because I don't use the native function for that, but if I remember well, you can't declare two knife.

By the way, take a look at "native functions" at the manual, because there is a command for projectiles which has way more control, including the map of the projectile
https://dcemulation.org/index.php?title=OpenBORManual#Engine_defined_functions_.28Native_functions.29
 
Ilu is right, we can't have 2 knives declared like that. One will be chosen if both are declared. The purpose of custknife is to choose which knife is thrown in the animation.

BTW Dyhego, have you loaded both knives?
You can load them from models.txt with load command instead of know OR simply set load ray1 and load ray2 in header. Unlike knife command, load command can be declared more than once :).
 
So in fact there are two knife declared in that code that I posted, I test with a knife just declared and it didn't work.

and using either load or know in models.txt, it doesn't work.
 
Dyhego, try this:

At the character header:
load ray1
load ray2

At the animation you want to spawn it:
@cmd projectile 0 "ray1" 20 1 30 0 0 0

and on the other animation:
@cmd projectile 0 "ray2" 20 1 30 0 0 0

It should be spawn.
 
Got it! I put ray1 and ray2 as the enemy type and in my character in throwframe, instead of firing the magic in frame 3 (last), I put it to fire in the second frame. In addition to adding loop 1 on ray1 and ray2 that I hadn't added.

I did this and solved it !!

Thanks to everyone who helped! ;D I stayed days to fix this ... :'(
 
Back
Top Bottom