じ☆ve冰风 发表于 6 天前

Simple parkable/reboardable land vehicle through events

For anyone trying to use land vehicles in their game, I realized there's a very simple way to get the same effect as the built-in vehicle feature without any scripting in just a couple event pages.

https://i.gyazo.com/6cb57db93c87e3156f90174cae1b8491.png

Page 1 is the idle vehicle without anyone driving it. Activating it plays a little animation of the player climbing inside, and then a self switch takes us to page 2, where we're behind the wheel.

https://i.gyazo.com/5a59e959e87635ea57b95d56048c187c.png

Boarding the vehicle event makes it invisible, hides the players' followers and replaces the actor sprite with one of him driving the car. While the player drivers around, the invisible vehicle event remains glued to the player (make sure you set the autonomous movement like the picture and have 'through' enabled in page 2 for this to work). This is so that wherever the player decides to disembark, that car event is able to reappear in a parked state facing the same direction the player was moving.

For parking to work we add a conditional branch where if the button is pressed, the self switch that brought us to page 2 is turned off, allowing the car event to return to its normal state and changing the actor sprite back to walking on foot after a little disembark animation.

There's some smoke and mirrors going on, but the end result is virtually the same as the built-in vehicle system. Here's a gif of the vehicle event in action.

https://i.gyazo.com/94f19f6c7ec24e740a81bf40deadc994.gif



本贴来自国际rpgmaker官方论坛作者:tylerash处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/simple-parkable-reboardable-land-vehicle-through-events.90441/
页: [1]
查看完整版本: Simple parkable/reboardable land vehicle through events