Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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
-
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...
-
i have tried that but it always says object doesn't have a gui texture component
-
im realy new and dont get how to make a health system can some one give me an example please
-
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.