Page 2 of 2

PostPosted: Tue Apr 03, 2007 9:30 pm
by ShingingDB
makslane wrote:You can put a collision event in the centerView actor.
How you move the centerView?


Uhh using this script.
Draw Actor -> Script Editor

int weight = 10;
x = ((weight -1)*x + player.x)/weight;
y = ((weight -1)*y + player.y)/weight;

Where I move the view follows my actor.

PostPosted: Tue Apr 03, 2007 11:14 pm
by makslane
Create two actors stopLeft and stopRight.
After your code, put this:

Code: Select all
if(x < stopLeft.x) x = stopLeft.x;
else if(x > stopRight.x) x = stopRight.x;


Don't need to use the collision event.

PostPosted: Wed Apr 04, 2007 11:27 pm
by ShingingDB
makslane wrote:Create two actors stopLeft and stopRight.
After your code, put this:

Code: Select all
if(x < stopLeft.x) x = stopLeft.x;
else if(x > stopRight.x) x = stopRight.x;


Don't need to use the collision event.


Would the stopLeft and stopRight have to be a filled region or wired region?

PostPosted: Wed Apr 04, 2007 11:48 pm
by makslane
Will works with any actor.

PostPosted: Thu Apr 05, 2007 6:04 pm
by ShingingDB
Dammit it still doesnt work...

PostPosted: Thu Apr 05, 2007 6:11 pm
by makslane
Please, create a simple ged only with your centerView actor, the stop actors, the background, the player and the actions need to make the movements. Post the file here and I will take a look.

PostPosted: Thu Apr 05, 2007 6:34 pm
by ShingingDB
There ya go