SphereCommunity
How to let the NPC to mount a horse? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: How to let the NPC to mount a horse? (/Thread-How-to-let-the-NPC-to-mount-a-horse)



How to let the NPC to mount a horse? - Jim - 01-27-2015 07:10 PM

using the SPEECH,
i can let the NPC dismount from a horse. as below:
//
[SPEECH spk_mount_dismount]
ON=dismount
IF (<FLAGS> & statf_onhorse)
SAY OK, I'll dismount
DISMOUNT
ELSE
SAY Oh, I had already dismounted
ENDIF
//

but, how to let the NPC to mount ?
i tried "MOUNT mount_uid", but it doesn't work.


RE: How to let the NPC to mount a horse? - Artyk - 01-27-2015 10:45 PM

Are you sure you provided a valid uid for 'mount_uid'?


RE: How to let the NPC to mount a horse? - Jim - 01-27-2015 10:55 PM

i use ".info" at a horse, and then get the "serial", for example: "01f6b",
is it the mount_uid?


RE: How to let the NPC to mount a horse? - Ben - 01-28-2015 09:24 AM

Not sure who wrote that info in the wiki, but it's false.
This function attempts to mount SRC on the current REF.
So what you need to do is:
mount_ref.TRYSRC <your_char_uid> MOUNT

This seems like an odd behavior... I think I might change it to work like what the wiki says Smile


RE: How to let the NPC to mount a horse? - Coruja - 01-28-2015 11:32 AM

if the npc corpse is not c_man or c_woman you must also add CAN=mt_mount to make it able to use mounts


RE: How to let the NPC to mount a horse? - Jim - 01-28-2015 01:01 PM

Thanks Ben & Coruja !

I changed the command format and check the CAN flag,
finally let the NPC to dismount/mount the horse by speech.
thanks agagin!

btw, the horse should be the pet of the NPC.