subtype touch

Gurtag

Active member
hey guys, how does "subtype  touch"  works exactly? i created coin item that spawns with script at some altitude/y, the item has a bbox wider enough and also has Z value, but it cant be grabed/touched until it hits the floor and char walks in to it´s same offset, does that mean bbox doesnt determine the touching? works just by offset position of char and item? or am i doing something wrong?
 
subtype touch was meant to be used by type item which is placed on ground
IOW it doesn't work if the item is airborne

If you want to create floating coin item, you'd need to use itembox instead
Example:
Code:
name    	Coin1
type    	item
score		1
bounce		1
noquake		1


anim	idle
	loop	1
	delay	5
	offset	10 20
	itembox	0 0 20 20
	frame	data/chars/misc/coin1.png
	frame	data/chars/misc/coin2.png
	frame	data/chars/misc/coin3.png
	frame	data/chars/misc/coin4.png

nsw25 should have some items using itembox in Super Journey Mega Quest TURBO :)
 
thanks a lot man, it works now but it seems Z value doesnt have any effect on itembox, btw i have read the manual but didnt find specific info about  how Z works on some commands, for exaple, what is the default Z for attack boxes(legacy command), bboxes, etc.
does a Z value of 20 on attack box will extend 10 pixels to each sides or 20? the later is the case for bbox acording to manual but it is the same for attackbox?  i read somewhere around the forums that by addeding 6st value you can set how much pixels it extend to each side independently, does this behavior works for bbox and attackbox alike?
 
I believe z parameter for bbox and attackbox works in both direction in z axis. So setting 20 will extend 20 pixels to both directions

i read somewhere around the forums that by addeding 6st value you can set how much pixels it extend to each side independently, does this behavior works for bbox and attackbox alike?

Hmmm.... never heard of that before

 
Bloodbane said:
I believe z parameter for bbox and attackbox works in both direction in z axis. So setting 20 will extend 20 pixels to both directions

i read somewhere around the forums that by addeding 6st value you can set how much pixels it extend to each side independently, does this behavior works for bbox and attackbox alike?

Hmmm.... never heard of that before

here you go.
http://www.chronocrash.com/forum/index.php?topic=1992.msg26473#msg26473

anyway, run some tests and the 6st value doesnt seem to have any effect so you are right, attack and bboxes work the same regarding Z, in case someone finds it usefull:

default bbox Z value is 1 pixel each side i think.

default attack Z value is 13 pixels to each side, leaving it on 0 or erasing the value would still count as default(13)

default rangeZ on enemies is 12 pixels to each side(rangez -12 12)

also itembox lacks Z value editing it seems, default should be the same as bbox i gess.

 
Back
Top Bottom