Killed Projectiles

maxman

Well-known member
How can I make the projectiles kill each other just like SF2 style? I don't want them to pass by.

projectile_crash.png


[attachment deleted by admin]
 
Yeah. The bbox is not a 2D bbox according to utunnels. I'm using the last two values which are z1 and z2. I know they are like zmin and zmax in levels.txt, but I'm so lost what values I would put for those z because I use negative and positive values for back and front. Like I tried here for example:

Code:
bbox 36 0 39 49 -2 -1 #bbox x y width height z1 z2

Code:
bbox 36 0 39 49 -2 3

Code:
bbox 36 0 39 49 0 4

The problem when I use bbox with the z inputs, is that they pass by without hitting each other.

I do use followcond 2 and followanim to attack an entity but not projectile. I also prepared script variable names like target/opponent's model (target, "model") if I want the projectile to hit player (possible accident), specific enemy, or another projectile. I want to specify which enemy or target to hit. (I might prepared follow2 anim for another follow-up if it's scripted.)

Code:
name  Hadoken
nolife  1
health 1
type  enemy
candamage enemy player
gfxshadow 0
speed 8
remove 1
alpha 1
setlayer 300


anim	idle
@script
       void self = getlocalvar("self"); //Entity
       void target = getentityproperty(self, "opponent"); //Target
       void tmodel = getentityproperty(target, "model"); //Against which model
       int type = getentityproperty(target, "type"); //Type for target/opponent
       //void projectile;

       if(frame == 0){ //First frame called
	  changeentityproperty(self, "name", "Ryu"); //Changing self's name as summoner's name against target
       }
	@end_script	
	attack 13 0 63 49 25 0 1 0 0 0
	loop	1
	delay	5
	followanim 1
	followcond 2
	hitflash	hadohit
	offset	-20 22
	bbox 36 0 39 49 -2 -1 #bbox x y width height z1 z2
	frame	data/chars/misc/hadoken/0700000000.gif
	offset	-19 24
	frame	data/chars/misc/hadoken/0700000001.gif
	offset	-18 28
	frame	data/chars/misc/hadoken/0700000002.gif
	offset	-15 28
	frame	data/chars/misc/hadoken/0700000003.gif
	frame	data/chars/misc/hadoken/0700000004.gif
	offset	-10 28
	frame	data/chars/misc/hadoken/0700000005.gif
	offset	-13 27
	frame	data/chars/misc/hadoken/0700000006.gif
	offset	-9 26
	frame	data/chars/misc/hadoken/0700000007.gif
	offset	-8 23
	frame	data/chars/misc/hadoken/0700000008.gif
	offset	-8 22
	frame	data/chars/misc/hadoken/0700000009.gif


anim	follow1
	loop	0
	delay	2
	offset	37 22
	frame	data/chars/misc/hadoken/0700500000.gif
	offset	71 54
	frame	data/chars/misc/hadoken/0700500001.gif
	offset	61 42
	frame	data/chars/misc/hadoken/0700500002.gif
	offset	59 45
	frame	data/chars/misc/hadoken/0700500003.gif
	offset	62 46
	frame	data/chars/misc/hadoken/0700500004.gif
	offset	65 46
	frame	data/chars/misc/hadoken/0700500005.gif
	offset	68 46
	frame	data/chars/misc/hadoken/0700500006.gif
	offset	70 44
	frame	data/chars/misc/hadoken/0700500007.gif
	offset	71 38
	frame	data/chars/misc/hadoken/0700500008.gif
	offset	71 39
	frame	data/chars/misc/hadoken/0700500009.gif
	offset	70 40
	frame	data/chars/misc/hadoken/0700500010.gif
	offset	69 40
	frame	data/chars/misc/hadoken/0700500011.gif
	offset	67 41
	frame	data/chars/misc/hadoken/0700500012.gif
	frame	data/chars/misc/hadoken/0700500013.gif
	offset	63 40
	frame	data/chars/misc/hadoken/0700500014.gif
	offset	46 37
	frame	data/chars/misc/hadoken/0700500015.gif
		
#|edited by openBor Stats v 0.67

[attachment deleted by admin]
 
IIRC if you put both z1 and z2 then z1 has to be negative and z2 positive. Also, 2~4 are too low, you should at least put values around 6~7 if you use z1 and z2, and a value around 11~13 if you put a single z value. I think the reference z value in OpenBOR is 12.
 
What do you mean by 6-7 and/or 11-13? I tried these but it doesn't work for killing each other.

Code:
bbox 36 0 39 49 12

Code:
bbox 36 0 39 49 -12 12

Code:
bbox 36 0 39 49 6 7

Code:
bbox 36 0 39 49 11 13

I know 2-4 are low but dunno what to do with the values. I can say 2 characters can use the same projectiles to attack.
 
I meant as absolute values.

If you use two z values, those are good :

Code:
bbox 36 0 39 49 -12 12

Code:
bbox 36 0 39 49 -6 6


Anyway it is useless to set both z1 and z2 values if they are symetric. z1 and z2 is for creating asymetric box (like a box bigger in front that in back)

They should definitely kill each other if the box is big enough.

 
magggas said:
First it will be destroyable with any other attacks and maybe grabable too

This is easily fixed with a custom type for projectiles. You can also use ondoattack script if you don't want to add a new type.

and second it will only the one destroy the other and never both each other at the same time.

Why is that ? If the follow animation is the same as the death animation, then no matter which one hits first the result will be the same.

I don't think using bbox logic is such a bad idea for this.

 
Back
Top Bottom