Page 2 of 2

PostPosted: Sat Jun 09, 2007 5:33 am
by d-soldier
Thanks for the shared experience... the problem is, most of the asteroids are not clones. Looks too obvious is each one is the same shape, spinning around at the same time, at the same frame... But it seems your first thought would work, working with a timer adjusted variable, and an "if" script... I'll work on that tomorrow...

POST EDIT:
Works like a charm! Just a simple IF variable with timer adjustment...

PostPosted: Sat Jun 09, 2007 5:49 pm
by d-soldier
Is it possible to give actors a directional persuasion?.. With my radom vectors/collisions the asteroids sometimes take up a direction that keeps them either horizontal/vertical in areas at the border of the screen.. Which means you cant see them while they are there... it doesn't happen frequently, but once is enough..

PostPosted: Sat Jun 09, 2007 6:42 pm
by pixelpoop
you could try comparing x against xprevious and if they are the same then change the angle. then do the same with y.
if (x=xprevious) angle =angle+1;

or you could get complicated and give each asteroid a slight gravity that would cause them to not move in a straight line.

PostPosted: Sat Jun 09, 2007 6:56 pm
by d-soldier
Nice! I set it on a 2 second timer, and it's small enough that you dont really notice the direction change. +1 for you!

PostPosted: Wed Jun 13, 2007 3:42 am
by d-soldier
I have these powerups appearing from a filled-region(which is on a path around the view to give a random starting position).. I want these powerups to destroy themselves when off screen (makes you rush to get them when they appear or lose your chance) but since they start outside of the view, the out-of-vision event doesn't fit... any ideas?

PostPosted: Wed Jun 13, 2007 11:24 am
by Sgt. Sparky
d-soldier, who is an awsome artist wrote:I have these powerups appearing from a filled-region(which is on a path around the view to give a random starting position).. I want these powerups to destroy themselves when off screen (makes you rush to get them when they appear or lose your chance) but since they start outside of the view, the out-of-vision event doesn't fit... any ideas?

make an actor variable(integer) called in.
then use this code on the draw actor event,
Code: Select all
if(xscreen > 0 && yscreen > 0 && yscreen < view.height && xscreen < view.width)in = 1;

then add on the out of vision event,
Code: Select all
if(in == 1)DestroyActor("Event Actor");

:D

PostPosted: Wed Jun 13, 2007 2:43 pm
by d-soldier
Works like a charm!

PostPosted: Thu Jun 14, 2007 3:00 pm
by Sgt. Sparky
Yay! :D