Author Topic: Custom Action in radial menu?  (Read 313 times)

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Custom Action in radial menu?
« on: October 13, 2012, 11:58:18 pm »


               My lack of correct terminology is holding me back from explaining my question correctly so please bare with me as I 
give an example of what I'm looking to do.

 If a new player logs into a server, the F4 on the hotbar may be unassigned. If you Right Click on F4 a radial menu shows with Action options to place into F4. If I recall correctly, one of these can be assigned from the server side without a hak that could trigger a script. If this is correct, what term can I use to look up how to do this?
               
               

               
            

Legacy_Pattycake1

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +0/-0
Custom Action in radial menu?
« Reply #1 on: October 14, 2012, 12:06:38 am »


               Yes you can. its called player tools.  You would write something like this or add this to your onmodenter event script:

#include "x2_inc_itemprop"

void main()
{
object oPC = GetEnteringObject();
object oSkin = GetItemInSlot (INVENTORY_SLOT_CARMOUR, oPC);
itemproperty ipSkin = ItemPropertyBonusFeat (IP_CONST_FEAT_PLAYER_TOOL_01);
IPSafeAddItemProperty(oSkin, ipSkin, 0.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
}

Then there is a script called x3_pl_tool01 that you would modify to do what ever it was you wanted the players to do. I believe there are a total of 9 or 10 of these player tools you can use.
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Custom Action in radial menu?
« Reply #2 on: October 14, 2012, 01:41:10 am »


               Fantastic Pattycake! Thank you kindly.
               
               

               
            

Legacy_Pattycake1

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +0/-0
Custom Action in radial menu?
« Reply #3 on: October 14, 2012, 03:10:43 am »


               I forgot to point this out..
IP_CONST_FEAT_PLAYER_TOOL_01 is tied to x3_pl_tool01
IP_CONST_FEAT_PLAYER_TOOL_02 is tied to x3_pl_tool02
IP_CONST_FEAT_PLAYER_TOOL_03 is tied to x3_pl_tool03
and so on...