The Daily Click ::. Forums ::. Klik Coding Help ::. Stars and other Projectiles
 

Post Reply  Post Oekaki 
 

Posted By Message

Nuklear41

Possibly Insane

Registered
  12/01/2008
Points
  2395

VIP MemberPS3 OwnerWii Owner
12th May, 2009 at 09:48:40 -

For the title screen of my new game I want to have a space background with starts and comets flying across the screen in the background. The best way I can think of doing this is to have an active object going up and down outside the screen and every few seconds it shoots a star. I would have like 4 or 5 of em shooting em' every few seconds and in different positions so there are multiple starts in different sizes. Is there a better way to do this? There has to be. This is just asinine.

Thanks

 
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3302

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
12th May, 2009 at 13:12:32 -

I used to do something similar to that when I first made games. Yes, there is a better way.

Always > Create object at some random position outside the playfield. (preferably one already to the right of the screen) For instance, (650, 240).
Value A of Projectile = 0 > Set Y position to Random(480) + Set Value A to 1. (Where 480 is the Playfield height)

Then you can either always set the X position to its current position minus 1 or 2 or however many you want, or just set it to a bouncing ball that always moves left.

If you don't want that many, you can create them based off of a timer or counter setup instead of an always condition. For different sizes you can just add another event in the second condition above to set the scale to Random(10)/10 OR just draw separate sizes as animations and change the animation to a random one. You could take it a step further and set the speeds to be Random(50) + 50 or something similar. Tell me if I need to clarify anything.



Edited by OMC

 

  		
  		

Nuklear41

Possibly Insane

Registered
  12/01/2008
Points
  2395

VIP MemberPS3 OwnerWii Owner
12th May, 2009 at 14:00:34 -

um... I need clarifying.

 
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3302

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
12th May, 2009 at 15:37:51 -

What part?

			
  	    

 

  		
  		

Nuklear41

Possibly Insane

Registered
  12/01/2008
Points
  2395

VIP MemberPS3 OwnerWii Owner
12th May, 2009 at 15:45:57 -

Mmmmmost of it. Is what your saying acctual commands I should see? Also don't forget I'm using 1.5

 
Image

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
12th May, 2009 at 16:00:48 -

This what you mean?
http://www.create-games.com/download.asp?id=5595

Not sure if it's made in 1.5 or 2.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

-MacAdaM-

Megaman Fosho

Registered
  12/02/2008
Points
  560
12th May, 2009 at 19:59:20 -

+Every second
---Create "star" at (650,0)
---Set "star" Ypos to random(480)

+Always
---set star Xpos to Xpos -1


This should would for the stars
Its pretty much what OMC was saying, just I tried purring it in easier-to-understand words.

 
Your just jealous that you're not as awesome as me.
(And my megaman avatar )

Nuklear41

Possibly Insane

Registered
  12/01/2008
Points
  2395

VIP MemberPS3 OwnerWii Owner
13th May, 2009 at 08:42:45 -

Thanks brotha. I'll try it!

 
Image
   

Post Reply



 



Advertisement

Worth A Click