Jump to content

Recommended Posts

I made a sword, that can be used as weapon, and it can also burn entities to death by single-shooting it by lightning... For weapon part, I used "weapon" component, for lightning - "spellcaster"...

 

The problem is that I can't cast spell on a creature, because only "Attack" action is showing, and "Cast Spell" isn't... Temporal removing "weapon" component solves this issue, but that's not a way of solving whole problem ;)

 

Is there a way to make it showing right ? "Examine" and "Cast Spell" actions seems to work together fine, so there must be a way to make it show correctly...

Edited by DevilXD
Link to comment
https://forums.kleientertainment.com/forums/topic/37137-weapon-and-spellcaster/
Share on other sites

try changing

function Telestone:CollectInventoryActions(doer, actions)  if self:CanInteract() then       if (self:IsMarked() and TheInput:IsKeyDown(KEY_CTRL)) then	        table.insert(actions, ACTIONS.RESET)       elseif self:IsMarked() then	        table.insert(actions, ACTIONS.RECALL)			   else		    table.insert(actions, ACTIONS.MARK)	   end		   endend

In your custom weapon component.

I do not have a custom weapon component, I uses the original one... The problem is that, weapon component "removes" Cast Spell action, that is coming from spellcaster component...

Add custom component maybe for managing actions of a weapon.

Component will consist only of that collect invenotry action function.

 

Edited by _Q_

Ok, maybe I'm describing it not right...

 

So, image when I'm pointing on the ground (everything works fine):

68ym6b6.png

 

Image when I mouse over a target (weapon component overwrites spellcaster component action):

Bfc5Hty.png

 

I want to acquire something like this (inspectable and spellcaster component's showing their actions at the same time):

ptHOuqA.png

 

So, where I should start ? Playeractionpicker component ?

Edited by DevilXD

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...