#include "x3_inc_horse"
void main()
{
object oPC=GetLastUsedBy();
}
Hitching Post - Dismount
Débuté par
Buddywarrior
, févr. 13 2011 05:28
#1
Posté 13 février 2011 - 05:28
I trying to get a dismount script that won't vanish the horse. I would like to use the OnClick of the Hitching Post, dismount and have the horse stay in front of the hitching post to be used later. I've tried Google and the NWN Lexicon, but maybe I can't find a solution because I don't know what I'm looking for.
#2
Posté 14 février 2011 - 12:59
doh.. I think watching Rocky IV has made me lose a few brain cells. Forgot the important part to the script.
I get the same result for both OnUsed and OnClick.. Horse doesn't dismount me, it just vanishes. I am using the NWN horse, not the CEP.
void main()
{
object oPC=GetLastUsedBy();
HorseInstantDismount(oPC);
}
I get the same result for both OnUsed and OnClick.. Horse doesn't dismount me, it just vanishes. I am using the NWN horse, not the CEP.
#3
Posté 14 février 2011 - 05:09
The function you are using is working as its supposed to. It won't create the horse object after dismount. What you need is something like so:
#include "x3_inc_horse"
void main()
{
object oCreature = GetLastUsedBy();
int bAnim=!GetLocalInt(OBJECT_SELF,"bDismountFast");
if (HorseGetIsMounted(oCreature)&&!HorseGetIsAMount(oCreature))
{ // is mounted
AssignCommand(oCreature,ClearAllActions(TRUE));
AssignCommand(oCreature,HORSE_SupportDismountWrapper(bAnim,TRUE));
} // is mounted
}
Hope that helps.
#include "x3_inc_horse"
void main()
{
object oCreature = GetLastUsedBy();
int bAnim=!GetLocalInt(OBJECT_SELF,"bDismountFast");
if (HorseGetIsMounted(oCreature)&&!HorseGetIsAMount(oCreature))
{ // is mounted
AssignCommand(oCreature,ClearAllActions(TRUE));
AssignCommand(oCreature,HORSE_SupportDismountWrapper(bAnim,TRUE));
} // is mounted
}
Hope that helps.
#4
Posté 14 février 2011 - 05:48
It's true what they say.. You are a God. Thank you, it works perfectly!





Retour en haut






