Is teleportNpc working properly?

Forum Forums Discussion Is teleportNpc working properly?

This topic contains 4 replies, has 2 voices, and was last updated by  VillainSlayer 3 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #32059

    VillainSlayer
    Participant
    0

    Hello, I have a question about teleportNpc. whenever I do repairNpc() Miqo will automatically target a mender in range and even switch npc targets if the one is selected is not a mender, I’m guessing this is maybe because it searches for the word mender in npc name? Is this the same way teleportNpc should work? for example I’m trying to do a custom scenario for squadrons and I have these lines on my chapter:

    // Reset Camera
    holdkey({PGDN}, 2.00)
    
    // Walks to Baracks Entrance
    waypoint(26)
    
    // Teleports to Baracks
    holdkey({PGUP}, 2.00)
    vangle(-0.40)
    angle(0.49)
    teleportNpc(Entrance to the Barracks)

    now I’ve tried all types on combinations, removed the angles, edited angle numbers as it says on my monitor tab, zoomed all the way in, reset the camera before going in, these little fixes work SOMETIMES. The problem I’m running into is that whenever I get to the telport npc Miqo willl target it properly, then select the NPC thats next to it. Any help appreciated thanks!

    • This topic was modified 3 years, 2 months ago by  VillainSlayer.
    #32068
    Lyfox
    Lyfox
    Participant
    1+

    Miqo always selects the closest NPC regardless of their name or camera angle. Targeting NPC by name is not supported atm. You can use waypointPrecise() to step closer to the barracks. Or you can insert holdKey(w, 0.4) before teleportNpc(). Should be enough to push your character closer to entrance.

    #32070

    VillainSlayer
    Participant
    0

    I see, thank you for the response will try your suggestions! 😀 Its strange that this is not a feature given the fact that miqobot already knows the npc name since it writes it on the log, unless the name is given after dialog starts.

    • This reply was modified 3 years, 2 months ago by  VillainSlayer.
    • This reply was modified 3 years, 2 months ago by  VillainSlayer.
    #32073
    Lyfox
    Lyfox
    Participant
    1+

    Its something that they plan to do in scenario update.

    #32076

    VillainSlayer
    Participant
    0

    Its something that they plan to do in scenario update.

    So far have been running it with waypointPrecise() and its been working perfectly! thanks again 😀

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.