Author Topic: Horse Dismount by Object?  (Read 361 times)

Legacy_Zephyrys

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Horse Dismount by Object?
« on: October 02, 2010, 07:59:43 am »


               Hello,

I'm trying to make it so when someone 'uses' a hitching post in my PW, it will dismount them from the horse they're currently riding.  Theoretically, this will also be used to fix instances where a PC gets stuck on a horse and needs to get off.  However, all my attempts to do so have resulted in either nothing happening to my mounted PC or an error in compiling.  This is what I currently have for the script:

#include "x3_inc_horse"

void main()
{
   object oPC=GetLastUsedBy();
   HorseInstantDismount(oPC);
}

Trying to use just plain "HorseDismount" results in the compiler error DECLARATION DOES NOT MATCH PARAMETERS

Any help is appreciated.  Thanks!
               
               

               


                     Modifié par Zorpheus, 02 octobre 2010 - 07:01 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Horse Dismount by Object?
« Reply #1 on: October 02, 2010, 09:16:26 am »


               Hmm. The script you posted works just fine for me. Are you trying to dismount an NWN horse or is it perhaps a CEP one? Have you altered the player properties skins or the default x3_mod_def scripts?
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horse Dismount by Object?
« Reply #2 on: October 02, 2010, 03:01:27 pm »


               The reason you are getting the declaration error is due to the fact that you must add in the oHorse object and define it.
               
               

               


                     Modifié par ffbj, 02 octobre 2010 - 02:04 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Horse Dismount by Object?
« Reply #3 on: October 02, 2010, 03:04:01 pm »


               My horse call method:
http://nwvault.ign.c....Detail&id=5921
               
               

               


                     Modifié par ffbj, 02 octobre 2010 - 02:05 .
                     
                  


            

Legacy_Zephyrys

  • Newbie
  • *
  • Posts: 38
  • Karma: +0/-0
Horse Dismount by Object?
« Reply #4 on: October 03, 2010, 02:19:37 am »


               

GhostOfGod wrote...

Hmm. The script you posted works just fine for me. Are you trying to dismount an NWN horse or is it perhaps a CEP one? Have you altered the player properties skins or the default x3_mod_def scripts?


I'm not sure how to differentiate between the two.  It's just a horse I used the built in NWN mount controls to get onto.  I don't think any alterations to those things have been made.