screen refresh

Talk about making games.

screen refresh

Postby raminjoon » Mon Jul 18, 2011 2:58 am

Ok guys I got two balls on the screen when ball one appears in the screen player gets to play and do whatever they can do to the ball but after a while ball goes off the screen and the next ball should come in how can do that like after the first ball disappears let the next ball appear on screen?
raminjoon
 
Posts: 40
Joined: Tue Jul 05, 2011 5:34 am
Location: Denver, Co.
Score: 3 Give a positive score

Re: screen refresh

Postby skydereign » Mon Jul 18, 2011 6:14 am

There is an event in gameEditor called "Out of Vision". Have an out of vision event that moves the second ball into the view. This assumes ball1 and ball2 are different actors.
ball1 -> Out of Vision -> Script Editor
Code: Select all
ball2.xscreen=view.width/2;
ball2.yscreen=view.height/2;
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: screen refresh

Postby raminjoon » Mon Jul 18, 2011 6:35 am

thanks for your code bud but here's an issue when I do that first of all it wont appear the second ball after when the first ball is out of vision it just automatically puts the second ball on the screen based on the deminsions I have gaven to it. so any clue why? bud.
raminjoon
 
Posts: 40
Joined: Tue Jul 05, 2011 5:34 am
Location: Denver, Co.
Score: 3 Give a positive score

Re: screen refresh

Postby skydereign » Mon Jul 18, 2011 7:17 am

What you just said made very little sense to me. It looks like you said the first problem is that the second ball won't appear when the first leaves view, and then you say that it automatically puts in the view where you specify. If the second part is true, that is exactly what you asked for. Otherwise here is an example of it working how I understood it.
Attachments
ball.ged
(1.25 KiB) Downloaded 75 times
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: screen refresh

Postby raminjoon » Tue Jul 19, 2011 6:20 am

thanks bud it worked I had to do some customization to fit my needs but it worked but one question though, this object the ball2 appears in the center of the screen how can I change that to make it appear where I want it to appear on screen?
raminjoon
 
Posts: 40
Joined: Tue Jul 05, 2011 5:34 am
Location: Denver, Co.
Score: 3 Give a positive score

Re: screen refresh

Postby skydereign » Wed Jul 20, 2011 2:27 am

To change the position it appears, just change where I put it. I set it to be the center, so xscreen=view.width/2 and yscreen=view.height/2. But if you wanted it to appear in the top left, you can use this.
Code: Select all
ball2.xscreen=0;
ball2.yscreen=0;


Or bottom of the screen, but center of the view.
Code: Select all
ball2.xscreen=view.width/2;
ball2.yscreen=view.height;


And so on.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest