simple spawning procedure?

Game Editor comments and discussion.

simple spawning procedure?

Postby eqarigon » Sun Nov 07, 2010 3:26 am

Hey all, working on my first game. Kinda a space invader game but instead of starting off with all the enemies at top moving back and forth and slowly dropping I want to have ships randomly drop from the top and fall down the screen for now. I been playing with the editor for a hour and cant seem to figure out how to get a enemy ship to spawn at the top of the screen. Just looking for simple steps to get a enemy ship to randomly spawn and drop down(ill complicate the game later, just want to get the basics down ;p ). While im at it as I was searching the topic I see alot of script editor suggestions......where does one go to learn the basis of the script editor?

Thanks
eqarigon
 
Posts: 2
Joined: Sun Nov 07, 2010 3:19 am
Score: 1 Give a positive score

Re: simple spawning procedure?

Postby eqarigon » Sun Nov 07, 2010 3:32 am

Forgot to add. When I set up my ship to fire, it was nothing like the tutorial I had to set the initial position at -206, -470 to fire from the ship....why is that?
eqarigon
 
Posts: 2
Joined: Sun Nov 07, 2010 3:19 am
Score: 1 Give a positive score

Re: simple spawning procedure?

Postby skydereign » Sun Nov 07, 2010 3:57 am

Okay, first off if you want to create an actor here are some things you should know. The last parameter of CreateActor takes an int, true/false. If you set it as true, the xy coordinates you specify will be relative to the real actor coordinate grid (unless parenting is involved). If you want it to be relative to the creator (event actor), then you set this to false. Though I don't know what tutorial you are looking at, if you want to create an actor at the top of the view at a random position, you should do it like this.
Code: Select all
CreateActor("actorName", "actorAnim", "(none)", "(none)", view.x+rand(view.width), view.y, true);
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: simple spawning procedure?

Postby NightOfHorror » Sun Nov 07, 2010 5:27 pm

DAD!!!!!!!!!!!!!!!!!!!!!! :shock: :shock: :shock: :shock: :shock:
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron