Page 1 of 1
screen refresh
Posted:
Mon Jul 18, 2011 2:58 am
by raminjoon
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?
Re: screen refresh
Posted:
Mon Jul 18, 2011 6:14 am
by skydereign
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;
Re: screen refresh
Posted:
Mon Jul 18, 2011 6:35 am
by raminjoon
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.
Re: screen refresh
Posted:
Mon Jul 18, 2011 7:17 am
by skydereign
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.
Re: screen refresh
Posted:
Tue Jul 19, 2011 6:20 am
by raminjoon
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?
Re: screen refresh
Posted:
Wed Jul 20, 2011 2:27 am
by skydereign
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.