mortenbroesby Posted July 22, 2014 Share Posted July 22, 2014 Has anyone figured out how to check which item is active / ready to be placed?I am trying to check if the held item has the tag "wallbuilder", but all my testing either crashes the game or does not register true... Link to comment Share on other sites More sharing options...
Heavenfall Posted July 22, 2014 Share Posted July 22, 2014 inst.components.inventory:GetEquippedItem(var) var must equal one of global EQUIPSLOTS Link to comment Share on other sites More sharing options...
mortenbroesby Posted July 22, 2014 Author Share Posted July 22, 2014 Thank you HeavenFall In the end, the following worked:local active_item = GLOBAL.GetPlayer().components.inventory:GetActiveItem()if active_item thenif active_item:HasTag("wallbuilder") then... Link to comment Share on other sites More sharing options...
mortenbroesby Posted July 22, 2014 Author Share Posted July 22, 2014 What about hiding the shown hover icon when a placable item is active? For example when a wall is held (active), it shows the wall icon on the cursor. I have been searching the prefabs dry for the base code :/ Link to comment Share on other sites More sharing options...
Heavenfall Posted July 22, 2014 Share Posted July 22, 2014 It is defined in the prefab file using the MakePlacer() function Link to comment Share on other sites More sharing options...
mortenbroesby Posted July 22, 2014 Author Share Posted July 22, 2014 Just to be clear, I am talking about the image that shows here: Not the green silhuette. Sure it's still the MakePlacer I need to look into? Link to comment Share on other sites More sharing options...
Heavenfall Posted July 22, 2014 Share Posted July 22, 2014 Ah no, the makeplacer is for the green thingy. No idea about icon. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.