Need Help Plot-scripting Vehicles to move across maps
Posted: Tue Jan 14, 2014 11:51 pm
Slime Salad discussion forums
https://www.slimesalad.com/forum/
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.
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.
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.
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
Code: Select all
autorun script
dismount script