Vehicle Throttle/Autowalk

finaljihad

Warper
Member
Joined
Dec 2, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
So in my RPG, the primary mode of long distance travel is via jet aircraft.

Some of these flights (purchased ticket) are scripted.

Some of the flights (hijacked) are under player control.

I need a system or simple eventing fix that will cause two effects to the vehicle in question:

1) Vehicle needs to move forward under its own power.

2) It needs to be steerable with the arrow keys while moving forward.

It's a jet airplane so if I stop pushing forward it shouldn't just stop.

I have tried creating an event on map which runs parallel and just causes the plane object (reskinned player) to take one step forward repeatedly at the slowest speed. This obviously blocks input from the arrow keys which should allow me to steer. Is there a simple script/event handler that I can add which will cause the arrow keys to momentarily override the 'forward' command? Variables increased or switches activated on button press?

I attached an image of what the flight system looks like right now. Give me some idea of how to code this please!

Thank you!
//cheers

planeflight.png
 

Zanazaru

Veteran
Veteran
Joined
Aug 17, 2015
Messages
85
Reaction score
6
First Language
German
Hey so when the "ship" is going by itself (the purchased flight) just use a set move route to where you want it to go.

For 2 you could try a common parallel event that you switch on whenever the player is actually controlling the ship.

Something like this (evented)

Contitional Branch ( if switch"pressed" == "off"){ key input processing(up,down,left,right; save in var"flewInDirection") Conditional Branch ( if var"flewInDirection" !=(is not) "0") <--- Edit: forgot this ConBranch { controll switch"pressed" = "on" }}else{ key input processing(up,down,left,right; save in var"stillPressing") Conditional Branch ( if var"stillPressing" == "0") { Conditional Branch (if var"flewInDirection" == "1") { set move route "up" controll switch"pressed" = "off" } else { Conditional Branch (if var"flewInDirection" == "2") { set move route "right" controll switch"pressed" = "off" } else { Conditional Branch (if var"flewInDirection" == "3") { set move route "left" controll switch"pressed" = "off" } else { Conditional Branch (if var"flewInDirection" == "4") { set move route "down" controll switch"pressed" = "off" } } } } }}The directions might be of as I don't have Xp installed ^^

it basicaly checks where you're going and let's you move one additional tile in that direction as soon as you stop pressing something^^
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top