I have recently began working on an rpg in OHRRPGCE based in the modern day where the player will unlock a car to navigate the world faster. Because vehicles cannot go from map to map because they are NPC's, i need to use plotscripting. the plotscript would be set to run on entrance of any map. i know how to make a plotscript activate an NPC (in this case the vehicle) however i do not know how to make a plotscript only be triggered if in a vehicle. i need to make the script check if the player was using the vehicle on the last map so that upon entrance of the map, if you were in the vehicle before entering, it will automatically activate the NPC corresponding to the same vehicle on the entered map, therefore making it appear to the player that the vehicle simply entered the map. Does anybody know how to make a plotscript check if the player was in a vehicle upon entering a map?
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.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x
Bob 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.
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
Meowskivich 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 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 will
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 will
Meowskivich 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 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 will
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.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x
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 will
Meowskivich 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 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 will
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.
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.
Guroo 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
I actually can't remember which will happen first. The easiest way to test is with a pair of scripts like this
Code:
plotscript, on dismount test, begin
$0="dismount script"
trace(0)
end
plotscript, map autorun test, begin
$0="autorun script"
trace(0)
end
plotscript, on dismount test, begin
$0="dismount script"
trace(0)
end
plotscript, map autorun test, begin
$0="autorun script"
trace(0)
end
Compile these scripts and assign them to the vehicle and the map autorun in your game, and then play and go through a door while riding the vehicle.
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:
autorun script
dismount script
autorun script
dismount script
then that means the autorun script ran first before the 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.



