playMaker

Author Topic: gui texture change when you hit into somthing help!  (Read 3372 times)

allo888

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
gui texture change when you hit into somthing help!
« on: April 06, 2012, 02: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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3643
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: gui texture change when you hit into somthing help!
« Reply #1 on: April 06, 2012, 04: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...

allo888

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: gui texture change when you hit into somthing help!
« Reply #2 on: April 06, 2012, 11:26:09 PM »
i have tried that but it always says object doesn't have a gui texture component

allo888

  • Playmaker Newbie
  • *
  • Posts: 24
    • View Profile
Re: gui texture change when you hit into somthing help!
« Reply #3 on: April 07, 2012, 12:42:19 AM »
im realy new and dont get how to make a health system can some one give me an example please

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3643
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: gui texture change when you hit into somthing help!
« Reply #4 on: April 07, 2012, 12: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.