Chaos Project

RPG Maker => Event Systems => Event System Requests => Topic started by: diagostimo on January 29, 2012, 04:51:14 am

Title: camera fix on event?
Post by: diagostimo on January 29, 2012, 04:51:14 am
so ye the title pretty much says it all, i have a switch that controls a pulley to move left or right, so at the start of my eventing sequence i need the camera to centre on the pulley and follow it, as the pulley leaves the seeable area of the switch, then to fix back onto the player once the event is exited so like this:

>something to fix camera onto event
>label-which way
>show text- which way would you like to go?
>show choices-left,right,none
>when left- move left, then jump to label which way
>when right-move right, then jump to label which way
>when none-branch end
>return camera to player

please if anyone knows how i could do this, i would be a very happy bunny :)
Title: Re: camera fix on event?
Post by: Blizzard on January 29, 2012, 05:14:19 am
You can use the "Scroll Map" event command for that.
Title: Re: camera fix on event?
Post by: diagostimo on January 29, 2012, 05:24:42 am
i did try to use the scroll map, say the pulley is 10 spaces from the switch it scrolls 10 spaces to center on the pulley, then i could get it to scroll with the direction that the pulley moves, but the problem is that if i exit the pulley switch then re enter it and i have left the pulley say 4 spaces from the switch, the scroll goes 10 space and thus we are not centered on the pulley :( also i found no real way to direct the camera back to the player as you can leave the pulley anywhere on its track so the direction to scroll is unpredictable
Title: Re: camera fix on event?
Post by: Blizzard on January 29, 2012, 06:10:12 am
You could use variables to keep track of how many spaces you've been moving around. This would also allow you get back to the player. Or even better: You should use variables to determine the position you want to scroll to and then scroll there. You may not be able to use a variable to tell the event how many spaces you want to scroll, but you can use a loop with moving one space at the time and decreasing the variable each time until the variable reaches 0.
Title: Re: camera fix on event?
Post by: diagostimo on January 29, 2012, 06:26:14 am
cool, ill have a mess around, altough im not to great with variables, i have used them to record x and y positions but thats about it :/
edit: sorta got it to work, but the scrolling isn't accurate, theres a demo of my project here, the switch iv been meddling with is the very top one from the spawn, its late here so im gonna get some rest, if anyone fancy's taking a look to see if they could crack it i would be very grateful :)
http://www.mediafire.com/?si1ib78cbdrv2ud