Page 1 of 1

Enemy (multi angle running) working scripts

PostPosted: Thu Mar 31, 2011 7:34 pm
by savvy
this is an enemy, which runs towards the player (pacblob controlled by moving with mouse) with a 2.5D camera angle, you could use this to make a boxhead type game.
when the enemy gets close, it will also attack.. but this is a demo, so you cant kill it and it cant kill you.
its a simple script, consisting of a change animation for each of the 8 stages.
if(animindex!=aangle) -> aangle is my shortcut for the (angle/360)*8;
{
if(aangle==0)
{
change to rotation 0
}
}
its the same for the attacking, but with an attacking variable.

any questions, post 'em here, if its useful... points would be nice.

(the numbers are my variable testers, they are... useless to you really)

Re: Enemy (multi angle running) working scripts

PostPosted: Thu Mar 31, 2011 8:18 pm
by schnellboot
this is not exactly the boxhead running type because in boxhead you can only run in 8 directions
you know what I mean? for now it's just the animation but maybe you can upgrade this with direction of running too :)

Re: Enemy (multi angle running) working scripts

PostPosted: Fri Apr 01, 2011 8:07 am
by savvy
this was just the idea of boxhead running, in order to make it exact i need to simply add xvel and yvel values instead of directional_velocity.

OR i just set angles depending on the animindex... eg: 0,45,90...

this is shown in this new update.