Asteroids movement (off screen)

Game Editor comments and discussion.

Postby d-soldier » Sat Jun 09, 2007 5:33 am

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...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby d-soldier » Sat Jun 09, 2007 5:49 pm

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..
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby pixelpoop » Sat Jun 09, 2007 6:42 pm

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.
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby d-soldier » Sat Jun 09, 2007 6:56 pm

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!
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby d-soldier » Wed Jun 13, 2007 3:42 am

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?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Wed Jun 13, 2007 11:24 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby d-soldier » Wed Jun 13, 2007 2:43 pm

Works like a charm!
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Sgt. Sparky » Thu Jun 14, 2007 3:00 pm

Yay! :D
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron