Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: allo888 on April 06, 2012, 05:56:12 PM

Title: gui texture change when you hit into somthing help!
Post by: allo888 on April 06, 2012, 05:56:12 PM
im making  a rpg with melee and i have made the animation and movements. but now i dont know how to make gui change when hit i have 6 textures and i want every time your hit to change texture and when you have no health you spawn in hospital room i have made. and i want the enemies to be within 50 cm near you to be able to him thats just an example
Title: Re: gui texture change when you hit into somthing help!
Post by: Alex Chouls on April 06, 2012, 07:04:03 PM
Use Set GUI Texture to change the texture.
Make an FSM with your 6 texture states, and trigger state changes on collision events.

Let me know if you need more detail, or if that points you in the right direction...
Title: Re: gui texture change when you hit into somthing help!
Post by: allo888 on April 07, 2012, 02:26:09 AM
i have tried that but it always says object doesn't have a gui texture component
Title: Re: gui texture change when you hit into somthing help!
Post by: allo888 on April 07, 2012, 03:42:19 AM
im realy new and dont get how to make a health system can some one give me an example please
Title: Re: gui texture change when you hit into somthing help!
Post by: Alex Chouls on April 07, 2012, 03:16:50 PM
i have tried that but it always says object doesn't have a gui texture component

You need to add a GUI Texture component to the GameObject.

You can create a new GUI Texture:
Unity Main Menu > Game Object > Create Other > GUI Texture

Or add a GUI Texture to an existing object:
Unity Main Menu > Component > Rendering > GUITexture

You should also look over the GUI Texture docs in Unity and play with it a bit in the editor to get the hang of it.