Quote:
Originally Posted by Alpho
Hello!
I'm trying to make a cape system. What is the best way of going about this? I was thinking a script within a gani and setting that as an attr on your player, but then you have the problem where sprites move around (walking gani for example). Is there any way to find the position of a certain sprite? Maybe there's an easier way of going about this?
Thank you!
|
Inside a gani you could do;
PHP Code:
SCRIPT
function onPlayerEnters() {
with ( findImg( 100 ) ) {
image = player.attr[#];// Image of Cape
layer = 2;
attachToOwner = true;
attachOffset = { -1, -3, 0 };
}
}
SCRIPTEND
But from my knowledge there is no way to tell exactly where the sprite location is inside the gani, at least not that i know of. Although there is getspriteforspritepos(obj) - returns object, but i never used it.