Post new topic    
Page «  1, 2
Liquid Metal King Slime
Send private message
 
 PostTue Feb 26, 2013 8:24 pm
Send private message Reply with quote
If you want an example of two vehicles on the same map, Wandering Hamster has one.

The only difference is that you need an additional set of global variables for each vehicle.

As for the remote vehicle triggering script, can you post it? We might be able to help you figure out what is wrong
Slime Knight
Send private message
 
 PostTue Feb 26, 2013 9:43 pm
Send private message Reply with quote
plotscript, call jet, begin
use NPC (1)
end
Liquid Metal King Slime
Send private message
 
 PostTue Feb 26, 2013 9:47 pm
Send private message Reply with quote
Ah, yes. That will cause the heroes to walk to whereever the jet is located. Try something like this

Code:
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
Slime Knight
Send private message
 
 PostTue Feb 26, 2013 10:20 pm
Send private message Reply with quote
Bob the Hamster wrote:
Ah, yes. That will cause the heroes to walk to whereever the jet is located. Try something like this

Code:
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


Tried it, had the same result as the old one, the characters still walk to the jet.
Metal King Slime
Send private message
 
 PostWed Feb 27, 2013 1:03 am
Send private message Reply with quote
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.
Slime Knight
Send private message
 
 PostWed Feb 27, 2013 1:26 am
Send private message Reply with quote
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.


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.
Metal King Slime
Send private message
 
 PostWed Feb 27, 2013 4:02 am
Send private message Reply with quote
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
Code:
set npc ignores walls(1, true)
set npc obstructs(1, false)
Slime Knight
Send private message
 
 PostWed Feb 27, 2013 2:14 pm
Send private message Reply with quote
I don't have any moving NPCs on the map, so that's not an issue. All I need to do now is adjust the autorun map script so that the helicopter is parked only when it is actually used, instead of appearing where the jet was last.
Slime Knight
Send private message
 
 PostFri Mar 01, 2013 3:06 pm
Send private message Reply with quote
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.
Liquid Metal King Slime
Send private message
 
 PostFri Mar 01, 2013 3:26 pm
Send private message Reply with quote
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.


In the vehicle editor, look for the line that says "If riding set tag"

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:

   if(check tag(tag: using vehicle)) then(exit script)
Slime Knight
Send private message
 
 PostFri Mar 01, 2013 4:51 pm
Send private message Reply with quote
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.
Liquid Metal King Slime
Send private message
 
 PostFri Mar 01, 2013 6:17 pm
Send private message Reply with quote
Try something like this, also at the top of the vehicle remote script

Code:

    if(current map <> map:World Map) then(exit script)


Or you could even get fancy and show a text box that says "This remote only works on the world map!"

Code:

    if(current map <> map:World Map) then(
      show text box(45)
      exit script
    )
Slime Knight
Send private message
 
 PostSun Mar 17, 2013 1:49 am
Send private message Reply with quote
How do I prevent vehicles from parking on each other? This isn't exactly game-breaking, it's just something I want to know.
Metal King Slime
Send private message
 
 PostTue Mar 19, 2013 1:39 am
Send private message Reply with quote
How do you park two vehicles on top of each other? Are they each set to pass through NPCs?
Slime Knight
Send private message
 
 PostTue Mar 19, 2013 1:43 am
Send private message Reply with quote
No, not under Vehicle Bitsets anyway, but they pass through other NPCs and park on each other anyway.
Display posts from previous:
Page «  1, 2