Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: MadToLive on July 17, 2014, 04:51:13 PM
-
Ok so I have an inventory system building currently. I have a public var as such:
var sanityLev : Texture2D;
and later in the inventory script I draw that texture to a specific section of the inventory when you open the inventory/hit the inventory button.
Using this portion of code to draw the texture in the right area.
{
GUI.DrawTexture(Rect(195,700,200,250), sanityLev);// Diplay First Sanity Texture
}
I have a sanity tracking FSM, it checks the global sanity level of the character, depending on the threshold of sanity level of the main player, i want it to change the Texture2D image for the sanityLev on the inventory script.
So say I have a brain image loaded up in the inspector to display when i first open the inventory. Then the character loses some sanity points later, when we open the inventory the Texture changed from a brain to a different image.
How do i accomplish this? I have not been working with Playmaker in awhile and everything I have found so far is confusing me. Does it have something to do with the Playmaker Set Property action? Would I use that somehow? Or something completely different?
SOLVED--------------------------------------------------------
Ok so that was actually super simple, I was trying to set the property of the wrong things, I was dragging the parent item in there and the objects in there trying to sort this out.
What I did that worked was I dragged the actual script onto the FSM, selected set property, in the drop down within that I found my variables that held the textures I wanted to change and bam. Done.