x


GUI, character selection & general menu

I need a script for a character selection menu i am creating for my game. This menu comprises of a GUI texture with gui textures laid over it which each have pictures of the characters on them. I want it so that when the player moves the move over one of these character images (gui textures) the texture switches to another texture (one that will be differently coloured but still a texture) and also to play a sound when it does this. I am also not sure how to get it so that when the player selects a character it will instantiate an object (the player model in this case). Thanks for the help.

I am new to coding in unity and i am still learning the basics which is why i need help with this. :)

more ▼

asked Apr 13 '12 at 06:57 AM

sgarner115 gravatar image

sgarner115
3 2 3 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I think that will be an example of "function OnMouse":

//what will happen when your players move mouse over one of your character

   function OnMouseEnter ()    
   {
   //here you write what should change (audio colors etc.)
   }

//what will happen when your players move mouse out one of that character
(this is necessary for your app to change after your player decides to choose different character

    function OnMouseExit ()
    {
    //colors back again etc.
    }

I hope it'll help

more ▼

answered Apr 16 '12 at 09:55 AM

McDardy gravatar image

McDardy
75 1 2 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3693
x477
x386
x13

asked: Apr 13 '12 at 06:57 AM

Seen: 523 times

Last Updated: Apr 16 '12 at 09:55 AM