With the vehicle bitset "Enable door use" turned on, if the player enters a door leading to another map, does the dismount script or map autorun script run first? if the map autorun script runs first i could make it to where a tag is turned on when in the vehicle and make the plotscript automatically use the vehicle npc in the new map when the tag is onBob the Hamster wrote:Vehicles can have mount/dismount scripts. The mount script can turn on a tag, and the dismount script can turn it off.
Need Help Plot-scripting Vehicles to move across maps
Moderators: Bob the Hamster, marionline, SDHawk
Need Help Plot-scripting Vehicles to move across maps
Last edited by Guroo on Tue Jan 14, 2014 11:54 pm, edited 1 time in total.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
I really like this idea but how would i go about exiting the vehicle aswell as having it appear on the map in the location that it was exited? i would like it to be where the player can get in there characters car, drive around the world and explore, and then be able to hop back in at there willMeowskivich wrote:Something off the top of my head, perhaps a script that changes the first person in the party's sprite to the vehicle and then disable caterpillar party so only hero 1 shows. Just an idea.
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
I...haven't quite got that part figured, perhaps with a menu command to exit the vehicle that simultaneously turns back on caterpillar party (if you want it on), changes front hero back to normal, and creates the vehicle NPC right where you are. Um, I don't know how to script much of that, so it's up to a plotsccript veteran to let you know the specifics, but that's my idea. It would probably be best to listen to whatever Bob the Hamster sez...er, says, he knows many things.Guroo wrote:I really like this idea but how would i go about exiting the vehicle aswell as having it appear on the map in the location that it was exited? i would like it to be where the player can get in there characters car, drive around the world and explore, and then be able to hop back in at there willMeowskivich wrote:Something off the top of my head, perhaps a script that changes the first person in the party's sprite to the vehicle and then disable caterpillar party so only hero 1 shows. Just an idea.
ill look into how i could make this work in my game however i dont know if i could make that function smoothly. if dismount scripts run after a map startup script if a player enters a door to a seperate map in a vehicle i could make it where the tag turned on by being in the vehicle would make you automatically use the vehicles npc in the next map, however i dont know if thats how it is or not.Meowskivich wrote:I...haven't quite got that part figured, perhaps with a menu command to exit the vehicle that simultaneously turns back on caterpillar party (if you want it on), changes front hero back to normal, and creates the vehicle NPC right where you are. Um, I don't know how to script much of that, so it's up to a plotsccript veteran to let you know the specifics, but that's my idea. It would probably be best to listen to whatever Bob the Hamster sez...er, says, he knows many things.Guroo wrote:I really like this idea but how would i go about exiting the vehicle aswell as having it appear on the map in the location that it was exited? i would like it to be where the player can get in there characters car, drive around the world and explore, and then be able to hop back in at there willMeowskivich wrote:Something off the top of my head, perhaps a script that changes the first person in the party's sprite to the vehicle and then disable caterpillar party so only hero 1 shows. Just an idea.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
I actually can't remember which will happen first. The easiest way to test is with a pair of scripts like thisGuroo wrote:With the vehicle bitset "Enable door use" turned on, if the player enters a door leading to another map, does the dismount script or map autorun script run first? if the map autorun script runs first i could make it to where a tag is turned on when in the vehicle and make the plotscript automatically use the vehicle npc in the new map when the tag is on
Code: Select all
plotscript, on dismount test, begin
$0="dismount script"
trace(0)
end
plotscript, map autorun test, begin
$0="autorun script"
trace(0)
end
the "trace" command adds a line to the end of the g_debug.txt file
If you open g_debug.txt and look at the bottom and you find
Code: Select all
autorun script
dismount script
I should do more thorough testing, but a couple years ago I was trying to get a script with mounting and dismounting vehicles working and it just never worked the way I assumed it would. I might look at it again.
I was asking in IRC and most people said "just do [x]" and so I assumed it was some stupid mistake I was making. There was a deadline so I ended up working on something else and having that scene not happen.
I was asking in IRC and most people said "just do [x]" and so I assumed it was some stupid mistake I was making. There was a deadline so I ended up working on something else and having that scene not happen.