Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Camera Cog
Camera Cog
2002-12-26, 11:24 AM #1
Code:
if((GetSenderRef() == console5) && (sentry != 0))
{
	SetCameraFocus(0, sentry);
	SetCameraFocus(1, sentry);
	For(i=0; i<18; i=i+1)
	{
		MoveToFrame(sentry, i, 2);
	}
	SetCameraFocus(0, player);
	SetCameraFocus(1, player);
}

The sentry moves - but the camera focus does not set to sentry. Why is this?
2002-12-26, 11:43 AM #2
I would guess because For() loops execute as fast as possible that the Camera is infact being set to the sentry for an instant but that the camera is set back on the player a millisecond later.
- Wisdom is 99% experience, 1% knowledge. -
2002-12-26, 11:45 AM #3
That code is good . . . except for that For loop. As far as I can tell, youve falled for that age-old misbelief about movetoframe... You only need one. 'Movetoframe(Sentry, 17, 2)'. That will move the object to frame 17 via all the frames inbetween. Try it if you dont believe me.


Check the object's flags. What is its parent template?
And when the moment is right, I'm gonna fly a kite.
2002-12-26, 11:46 AM #4
Oh . . wait . . yeah, youll need a "Waitforstop(Sentry)" before setting the veiw back to the player.
And when the moment is right, I'm gonna fly a kite.
2002-12-26, 2:09 PM #5
Thanks a ton.

↑ Up to the top!