Author Topic: Mount Related Question  (Read 344 times)

Legacy_Mad.Hatter

  • Full Member
  • ***
  • Posts: 156
  • Karma: +0/-0
Mount Related Question
« on: July 25, 2011, 05:06:04 am »


               I am using a racial/armor encumbrance system. It basically gives supernatural speed decreases of varying amounts to (a) people in heavy and medium armor and ('B)' small races. It does all the right things like not slowing dwarves down in armor, etc. The system works exactly like I want it to.

I am now trying to make that system play nice with the out-of-the-box mount scripts. I want to remove all speed decreases from the rider when they mount and reapply them when they dismount. I was planning on just using my preexisting RemoveEncumbrance and SetEncumbrance functions. I'm just having one problem--where would I call them from?

I had no success setting premount and postdismount string variables on the mount (made set and remove scripts that called the functions) and haven't figured out where I would call my functions within x3_inc_horses in the default HorseMount and HorseDismount.

Any helpful suggestions to point me in the right direction?
               
               

               
            

Legacy_Axe_Murderer

  • Full Member
  • ***
  • Posts: 199
  • Karma: +0/-0
Mount Related Question
« Reply #1 on: July 25, 2011, 09:14:36 pm »


               You are setting the variables on the horse blueprints not on pre-placed mounts right? Horses get destroyed and recreated when you mount/dismount them, so any changes you make to pre-placed ones get wiped out when they are respawned during mount/dismount activities if their blueprints don't have those variables set on them.
               
               

               


                     Modifié par Axe_Murderer, 25 juillet 2011 - 08:15 .
                     
                  


            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
Mount Related Question
« Reply #2 on: July 25, 2011, 10:43:58 pm »


               You may want to take a look at my horse call method which contains the horse mount dismount actions within it.  Then you could easily plug in you set and remove encumbrance within the scripts.

Horse Call Method:
http://nwvault.ign.c....Detail&id=5921

Even if you choose not to use it it may help you to take a look at it.
One probelm I can forsee whichever method you choose, is that when a person leaves the world mounted they would be under encumberance removed.  In my method anyone leaving the campaign mounted re-appears in the world un-mounted via the onclienter enter script.  So that is where you would add in the set-encumberance.  By dismounting them then detsroying the horse, etc..  Also ondeath is something to keep in mind, that is if the PC dies mounted you would have to do the same thing there too.  Good Luck!

The video:
http://nwvault.ign.c...s.Detail&id=602
               
               

               


                     Modifié par ffbj, 25 juillet 2011 - 10:00 .
                     
                  


            

Legacy_Mad.Hatter

  • Full Member
  • ***
  • Posts: 156
  • Karma: +0/-0
Mount Related Question
« Reply #3 on: July 25, 2011, 11:20:45 pm »


               @ffbj: I will definitely look at what you did. Thanks.

@Axe_Murderer: That totally makes sense. I did in fact set those variables on a placed horse for testing. I'll check it out using blueprints (I intended to do that anyway).
               
               

               
            

Legacy_AndarianTD

  • Hero Member
  • *****
  • Posts: 725
  • Karma: +0/-0
Mount Related Question
« Reply #4 on: July 26, 2011, 12:16:30 am »


               Coming in late, but I was going to say that Axe's explanation makes the most sense to me sight unseen. If the variables aren't on the blueprint, it won't work. The first mount calls might be OK, but not the ones after that because the respawned mount won't have the variables.
               
               

               


                     Modifié par AndarianTD, 25 juillet 2011 - 11:20 .
                     
                  


            

Legacy_Mad.Hatter

  • Full Member
  • ***
  • Posts: 156
  • Karma: +0/-0
Mount Related Question
« Reply #5 on: July 26, 2011, 04:07:24 am »


               The blueprint fixed my issues. Thanks you guys. I'm glad that it wasn't my script. :X