quick question about the custkinfe

Moonlight_Rose

New member
hello all  :D

So a quick question about the custknife. Is it possible for these types of projectiles to have multiple hits?
see im trying to make the golden knife from castlevania 2 for the nes.It flys straight hits 3 times then disappears.

 
Any projectiles can hit multiple times as long it has multiple attackbox and each attackbox has been turned off in between each attack

Let me get this clear: golden knife flies straight then after it hits something, it attacks 3 times before disappearing right?
 
yes bloodbane. exactly.  I tried to give the knife the multiple hits but i think i mustve done it wrong.
heres the txt file.

name knife
health 10
speed 15
type npc
shadow 0
candamage enemy obstacle player

palette data/chars/richter/knife/1000.png


anim attack
loop 0
delay 5
offset 45 50
attack 35 19 35 31 100 0 0 0 0 0
frame data/chars/richter/knife/1000.png
offset 45 50
attack 0 0 0 0 0 0
frame data/chars/richter/knife/1001.png
offset 45 50
attack 35 20 35 29 100 0 0 0 0 0
frame data/chars/richter/knife/1000.png
offset 45 50
attack 0 0 0 0 0 0
frame data/chars/richter/knife/1001.png
offset 45 50
attack 35 20 35 30 100 0 0 0 0 0
frame data/chars/richter/knife/1000.png
offset 45 50
attack 0 0 0 0 0 0
frame data/chars/richter/knife/1001.png

anim idle
loop 1
delay 5
offset 45 50
frame data/chars/richter/knife/1000.png
offset 45 50
frame data/chars/richter/knife/1001.png
 
I believe it's best to do it like this:
name PPisauG
type none
candamage enemy obstacle
speed 10
lifespan 5
remove 0
subject_to_platform 0


anim idle
loop 1
delay 12
offset  1 3
followcond 1
followanim 1
attack  1 1 25 5 10 1 0 0 0
frame data/chars/misc/subweap/pisauG.png
frame data/chars/misc/subweap/pisauG.png

anim follow1
@script
  if(frame==1){
    void self = getlocalvar("self");
    changeentityproperty(self, "speed", 0, 0, 0);
  }
@end_script
delay 1
offset  1 3
spawnframe 1 24 0 0 0
custentity PApi
frame data/chars/misc/subweap/pisauG.png
delay 10
frame data/chars/misc/empty.gif
frame data/chars/misc/empty.gif

This golden knife when it hits an enemy or obstacle, will spawn small flame which will burn the enemy or obstacle
 
I'm working on a similar thing. https://www.mediafire.com/?ns8rvaah7b07lql
Here's a bunch of sub-weapons I made. Add the below to your models.text:

#---( SUBWEAPONS N SUCH )---#
load axe1 data/chars/misc/weapons/axe1.txt
load axe2 data/chars/misc/weapons/axe2.txt
load hammer data/chars/misc/weapons/hammer.txt
load hammer2 data/chars/misc/weapons/hammer2.txt
load kusarigama data/chars/misc/weapons/kusari.txt
load bone data/chars/misc/weapons/bone.txt
load boomerang data/chars/misc/weapons/boomer.txt
load cross data/chars/misc/weapons/cross.txt
load fireball data/chars/misc/weapons/fireball.txt
load fireblast data/chars/misc/weapons/fireblas.txt
load firebounce data/chars/misc/weapons/fireboun.txt
load knife data/chars/misc/weapons/knife.txt
load gold_knife data/chars/misc/weapons/gknife.txt
load hand_grenade data/chars/misc/weapons/grnhnd.txt
load stick_grenade data/chars/misc/weapons/grnstk.txt
load holy_water data/chars/misc/weapons/hwater.txt
load sacred_flame data/chars/misc/weapons/sflame.txt
load fire_water data/chars/misc/weapons/fwater.txt
load ice_water data/chars/misc/weapons/iwater.txt
load land_mine data/chars/misc/weapons/lmine.txt
load magic_chakram data/chars/misc/weapons/mchakram.txt
load magic_crystal1 data/chars/misc/weapons/mcryst1.txt
load magic_crystal2 data/chars/misc/weapons/mcryst2.txt
load skull data/chars/misc/weapons/skull.txt
load stake data/chars/misc/weapons/stake.txt
load star data/chars/misc/weapons/star.txt
load wood_arrow data/chars/misc/weapons/arrwood.txt
load stone_arrow data/chars/misc/weapons/arrstone.txt
load bone_arrow data/chars/misc/weapons/arrbone.txt
load iron_arrow data/chars/misc/weapons/arriron.txt
load gold_arrow data/chars/misc/weapons/arrgold.txt
load bomb_roll data/chars/misc/weapons/bombroll.txt
load bomb_bowl data/chars/misc/weapons/bombbowl.txt
#---( End of weapons list )---#

They're all very small, so loading them shouldn't be much of a problem. Just call them in you character's text with Custknife. That said, I think They're all set as bomb entities to take advantage of the attack1 and attack2 differentiations. There's a bunch of examples for you to  fiddle with. I have the Kusarigama set to attack multiple times if you want to start with that one. Enjoy.
 
BTW Moonlight Rose, you can do your golden knife like this:
Code:
name		knife
type		none
candamage	enemy obstacle
speed		15
lifespan	5
remove		0


anim	idle
	loop	1
	delay	5
	followcond 1
	followanim 1
	offset	45 50
	attack	35 19 35 31 100 0 0 0 0 0
	frame	data/chars/richter/knife/1000.png
	frame	data/chars/richter/knife/1001.png

anim	follow1
@script
  if(frame==1){
    void self = getlocalvar("self");
    changeentityproperty(self, "speed", 0, 0, 0);
  }
@end_script
	fastattack 1
	delay	5
	offset	45 50
	frame	data/chars/richter/knife/1000.png
	attack	35 19 35 31 100 0 0 0 0 0
	frame	data/chars/richter/knife/1001.png
	attack	0 0 0 0 0 0
	frame	data/chars/richter/knife/1000.png
	attack	35 19 35 31 100 0 0 0 0 0
	frame	data/chars/richter/knife/1001.png
	attack	0 0 0 0 0 0
	frame	data/chars/richter/knife/1000.png
	attack	35 19 35 31 100 0 0 0 0 0
	frame	data/chars/richter/knife/1001.png
	attack	0 0 0 0 0 0
	frame	data/chars/richter/knife/1000.png
	frame	data/chars/richter/knife/1001.png

I used spawnframe in my previous example cause I don't want to force same palette for flame and knife
 
sorry for the late reply but i have horrible internet around here.

Anyway thankyou for the help Bloodbane SaintJudas.
thou at first what you posted Bloodbane was really confusing lol thankyou for making it easier
by showing me where everything went.Never saw that kind of stuff in the Ob manual.

thanks for the items SaintJudas, i love how awesome the  blue hw burn affects looks and the  stfire affects look straight outta the Castlevania 2.

thanks again guys for the help 

 
You should check out the ice water and firebounce. The ice water creates a small platform block if it hits the ground, but if you give the enemy a proper pain animation, you can turn the enemy into a bigger frozen platform.
Firebounce is my take on mario's fireball power-up. it requires two entities two make, but is a lot of fun to fiddle with.
 
Back
Top Bottom