Camera locking

Status
Not open for further replies.

EmeraldDemnia

Villager
Member
Joined
Jul 7, 2019
Messages
15
Reaction score
5
First Language
Dutch
Primarily Uses
RMVXA
In Archeia's list on top of this forum I found a scriptcall to lock the camera on either the player or an event. The thread is no longer open for replies so I figured this would be the best place to ask (correct me if I'm wrong).

It's this little piece of code: $game_player.center($game_player.x, $game_player.y)

Which I get to work fine with a litteral copy, but now I want to set it to follow an event. I've tried map_event[x] (where x is ofcourse the eventnumber on the map). But I think I have the wording off for ruby. Could anyone shine a light on it for me please.

Kind regards.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
To check event coordinate, It's $game_map.events[id].x, $game_map.events[id].y
... CMIIW, I'm not sure myself
 

EmeraldDemnia

Villager
Member
Joined
Jul 7, 2019
Messages
15
Reaction score
5
First Language
Dutch
Primarily Uses
RMVXA
Awesome that works! Thanks.

Any idea how to make it scroll along with that event when moving as well? I want to lock the player on his spot by closing a spike square around him and make the event move by player movement so scroll map may be an option, but maybe a script gives a better visual effect.
 

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,468
First Language
Indonesia
Primarily Uses
RMMV
I believe the script only target coordinate. Not target the character. Even if you keep updating the command, it will only scroll for each time the character move a tile.
 
Last edited:

EmeraldDemnia

Villager
Member
Joined
Jul 7, 2019
Messages
15
Reaction score
5
First Language
Dutch
Primarily Uses
RMVXA
Thanks for your replies.

For future reference. I've tried to refresh the command, but it jumps instead of scrolls and gives a nasty visual effect.
Best way to solve it (as far as I found) is by doing it as I said, make event move by player movement so you can add a scroll map command.
Or have a parallel process keep track of the event x and y on the map and scroll accordingly.

This topic may be closed I think
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You could try $game_player.center($game_map.events[id].x, $game_map.events[id].y) in a parallel process event that has a Wait 2 Frames before or after the command. I don't know if it'll still jump - looks to use the grid, so it might do.

To have a topic closed, you need to report your first post and let the mods know it's resolved.
 

Ms Littlefish

Dangerously Caffeinated
Global Mod
Joined
Jan 15, 2014
Messages
6,417
Reaction score
8,104
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,455
Members
137,821
Latest member
Capterson
Top