Official Community Forums
 
HomeHome  SearchSearch  RegisterRegister  Log in  The Wiki  Website  github Project  

Share
 

 How to equip weapons?

Go down 
AuthorMessage
Tristan
Administrator
Administrator
Tristan

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

How to equip weapons? Empty
PostSubject: How to equip weapons?   How to equip weapons? EmptyTue 13 Mar - 5:40


I've used Sampleworld as a basis for my own world, so it should all be configured - if you have a sword in your inventory, how do you equip it, so that it's in the players hand?
Back to top Go down
http://www.3dmodeller.info
Delurin
Head of Platform Development
avatar

Posts : 424
Join date : 2011-08-03

How to equip weapons? Empty
PostSubject: Re: How to equip weapons?   How to equip weapons? EmptyTue 13 Mar - 8:51

(I assume you mean other than the player clicks on the Icon in the backpack) You need to make sure that the Player Model has an entry in the weapon definition

Code:
dc = DisplayContext("sword.mesh")
        dc.setAttachInfo(DisplayState.IN_COMBAT, MarsEquipSlot.PRIMARYWEAPON, MarsAttachSocket.PRIMARYWEAPON)
        dc.setAttachInfo(DisplayState.NON_COMBAT, MarsEquipSlot.PRIMARYWEAPON, MarsAttachSocket.PRIMARYWEAPON)
        dcMap = DCMap()
        dcMap.add(human_female_fantasy_DC, dc)
        tmpl = Template("Longsword2")
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_ICON,
                "Interface\FantasyWorldIcons\WEAPON_sword_A")
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_ACTIVATE_HOOK, EquipActivateHook())
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_EQUIP_INFO, equipInfo)
        tmpl.put(InventoryClient.ITEM_NAMESPACE, InventoryClient.TEMPL_DCMAP, dcMap)
        ObjectManagerClient.registerTemplate(tmpl)


you need to make sure that for every charater model you have there is:
Code:
dcMap.add(human_female_fantasy_DC, dc)

it does not have to be the same display context for each one. That way you can have an item that looks different for each character model i.e. dress versus pants if you want
Back to top Go down
Tristan
Administrator
Administrator
Tristan

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

How to equip weapons? Empty
PostSubject: Re: How to equip weapons?   How to equip weapons? EmptySat 24 Mar - 3:24

Ah yeah, I forgot to add the player model to the weapon's template entry!
Back to top Go down
http://www.3dmodeller.info
Sponsored content




How to equip weapons? Empty
PostSubject: Re: How to equip weapons?   How to equip weapons? Empty

Back to top Go down
 
How to equip weapons?
Back to top 
Page 1 of 1
 Similar topics
-
» MOTUC Great Unrest Weapons Pack Zoar eagle
» This game sure can be adamant about wanting players to take certain weapons
» muxxu gameplay
» weapon underestimated???
» new destiny.

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Client Scripting and Development-
Jump to: