Author Topic: Most Complicated Sitting Ever  (Read 340 times)

Legacy_StupidIrishKangaroo

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Most Complicated Sitting Ever
« on: November 06, 2011, 08:37:05 am »


               I am trying to make a script for my server, but I have suddenly run into a huge problem I am unsure I can bypass and I wanted to know if there was a way. I am wanting a character to equip an item while sitting (the queue is causing problems, unsure how to bypass it), and as it stands, the item is just staying in the character's inventory because he is sitting on a chair.

':wizard:'  Thanks for the help either way, if it is possible great, and if it is not I would like to know that before I waste my time.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Most Complicated Sitting Ever
« Reply #1 on: November 06, 2011, 12:12:02 pm »


               Im afraid that it is not possible do to, neither I can think of any workaroud that would look the same way with current custom content.
               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
Most Complicated Sitting Ever
« Reply #2 on: November 06, 2011, 01:30:48 pm »


               You have to cancel the sitting action, which will make the NPC stand, then equip the weapon and redo the sitting animation.

As for a player, if the item is in a quick slot, you can be sitting and hit the quick slot function, which will remove/equip items while still doing the action, such as sitting.

FP!
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Most Complicated Sitting Ever
« Reply #3 on: November 09, 2011, 01:15:51 pm »


               At least not with Vanilla nwn.

NWNX does have the capacity to avoid Action Queues etc, and bypass some of the functionality n nwn.


Eg- Essentially, the equipping of an item, is
1. move from one location in inventory, to another.
2. It fires an event to say its equipped
3. It fires more events and function calls to iterate through the item properties, making sure its do-able, and calculates the bonuses etc

Some where along this path - probably between 1 and 2, it does the whole 'do I have a free action queue slot' check.

Using nwnx, it could theoretically be possible to
1. Move items programatically.
2. Move items programatically into equipped item slots.
3. Bypass Action Queue checks.

I am not aware of any plugins that do this, but from my own knowledge of nwnx and the principle on which nwnserver is built, it seems do-able from a nwnx plugin point of view to make some actions bypass action queue in some scenarios.