|
Post by darthfarter on Aug 8, 2018 7:37:10 GMT
Hello. I would like to add my weapon to the meleeManager (rightweaponslot)by script. I dont use vInventory or vItemManager. So right now i have to pause and manually drag my weapon in to the slot and i get it to work that way. I just want to know what code part it is for adding it to the slot. Thanks
|
|
cyhak
Full vMember
Posts: 80
|
Post by cyhak on Aug 8, 2018 22:20:05 GMT
i don't know how to do this by script but this would be my solution: place the weapons in the handlers in the hierarchy and deactivate/activate them via a script..
would be my suggestion :d
|
|
|
Post by darthfarter on Aug 9, 2018 5:21:38 GMT
Thx for the effort dude but that is no good solution for me since my weapons are added by another asset in to the character. Just want to know that magic reference that puts the melee weapon in to the slot of meleeManagers right/leftWeaponSlot?I mean how does the meleeManager recognize that a weapon is added to the character?
|
|
|
Post by darthfarter on Aug 15, 2018 16:00:41 GMT
It was a simple solution. manager = GetComponentInParent<vMeleeManager>(); axe = this.gameObject; manager.SetRightWeapon(axe);
|
|