Re: Linking Multiple Objects
Make the detector square part of the enemy objects' animations. That way during the event loop you can change animation to collision box, test for collisions, then change it back to whatever it was before so the player sees the animations. ;)
Re: Linking Multiple Objects
Wow nice, well this would work but it would require me to manually keep track of animation frames, unless there's something built in where it can say return to the frame it was at.
Re: Linking Multiple Objects
Yeah there is something built in. Alterable values. But, sadly this isn't what you wanted.
Re: Linking Multiple Objects
No sweat, shouldn't be too hard, thanks for the help this saved me hours of coding.
Re: Linking Multiple Objects
Just thought I'd thank you again =D I just implemented this in an hour would it could have take me days. Woohoo! Works perfect.
Re: Linking Multiple Objects
Actually I just ran into a strange problem, for some reason it works fine for the the enemy to move and check against walls, but it screws up when I'm testing hit detection between the enemy and my character, Though it shouldn't I have everything set up correctly.
Here's how I have my Event List set up
GAME LOOP-->
PRE-LOOP--> Sets animation to the square
ENEMYS--> Calculates movement
PLAYER--> Calculates movement and hit detection
EVENTS--> Irrelevant
POST-LOOP--> Sets animation back to normal so the player sees it
END
I don't get how the player isn't calculating the hit detection correct, I have an animation that is bigger then the hit detection and for some reason it's calculating the hit detection to that animation. I'm kind of lost anyone have any ideas? x.x
Re: Linking Multiple Objects
Actually I fixed it, I set it to check for collision in the enemy loop rather then in the player loop and that fixed it, not really sure how that fixes it but I won't complain