Vehicle help
Moderators: Bob the Hamster, marionline, SDHawk
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Ah, yes. That will cause the heroes to walk to whereever the jet is located. Try something like this
Code: Select all
plotscript, call jet, begin
set NPC speed(1, 20) # really fast
walk NPC to Y(1, hero Y(0))
walk NPC to X(1, hero X(0))
wait for NPC(1)
set NPC speed(1, 10) # back to whatever is normal for the vehicle
use NPC (1)
end
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
Tried it, had the same result as the old one, the characters still walk to the jet.Bob the Hamster wrote:Ah, yes. That will cause the heroes to walk to whereever the jet is located. Try something like this
Code: Select all
plotscript, call jet, begin set NPC speed(1, 20) # really fast walk NPC to Y(1, hero Y(0)) walk NPC to X(1, hero X(0)) wait for NPC(1) set NPC speed(1, 10) # back to whatever is normal for the vehicle use NPC (1) end
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
Thanks, I added a set NPC ignores walls command and it worked the way I wanted it too. Now I just need to find a way to stop the other vehicle from following me where the jet should have parked.Gizmog wrote:Did the jet move at all? It's possible you might have to suspend obstructions or wall maps or something so the vehicle can get all the way there.
Just an aside. "suspend npc walls" by itself is dangerous because it will allow wandering npcs to start walking through things. Usually you want to use "suspend npcs" at the same time, and also in this case "suspend obstruction" to let the vehicle move through NPCs.
However you can let NPC 1 walk through anything without having to use "suspend npcs" wth
However you can let NPC 1 walk through anything without having to use "suspend npcs" wth
Code: Select all
set npc ignores walls(1, true)
set npc obstructs(1, false)
Last edited by TMC on Wed Feb 27, 2013 4:08 am, edited 1 time in total.
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
In the vehicle editor, look for the line that says "If riding set tag"jcenterprises wrote:Actually, now I need to know how to make the Remote only work when I am not already in a vehicle because using it while in a vehicle causes some odd behavior, such as characters walking at a higher speed than usual, and vehicles floating in mid-air when not in use.
You can pick a tag that will automatically be turned ON when you ride a vehicle, and turned OFF when you dismount
At the beginning of your vehicle remote script, you can have something like:
Code: Select all
if(check tag(tag: using vehicle)) then(exit script)
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
Thanks! I also figured out how to stop having the copter follow the player after parking the jet. I simply got the stop jet script to stop trying to remember where the vehicle was parked everytime the jet was dismounted, it would only work with the copter for some reason, even though I never used it. Now the only way to use the jet at all everytime you enter the world map is with the remote.
EDIT:Oh, so close! Now I gotta make it so the Remote only works on the World Map, no other maps, or it gets errors.
EDIT:Oh, so close! Now I gotta make it so the Remote only works on the World Map, no other maps, or it gets errors.
Last edited by jcenterprises on Fri Mar 01, 2013 4:53 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:
Try something like this, also at the top of the vehicle remote script
Or you could even get fancy and show a text box that says "This remote only works on the world map!"
Code: Select all
if(current map <> map:World Map) then(exit script)
Code: Select all
if(current map <> map:World Map) then(
show text box(45)
exit script
)
Last edited by Bob the Hamster on Fri Mar 01, 2013 6:18 pm, edited 1 time in total.
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact:
- jcenterprises
- Slime Knight
- Posts: 132
- Joined: Sun Aug 21, 2011 7:30 pm
- Contact: