Advertisement

In game shop

Started by June 27, 2017 01:37 AM
12 comments, last by Lactose 7 years, 5 months ago

hey everyone!

so im trying to create an in game shope to spend the in game currency and i want the kind of shop that when you touch the skin you unlock it and select it (i've tried several ways didnt work only with a button :/ ) so can anyone please help

3 hours ago, NeroGame said:

 

hey everyone!

so im trying to create an in game shope to spend the in game currency and i want the kind of shop that when you touch the skin you unlock it and select it (i've tried several ways didnt work only with a button :/ ) so can anyone please help

 

What engine and can you show us what setup you have now?

 

By skin I assume you mean textures you are selling, and as such I will just call it the item.

The simplest way to do this would be to check if the mouse X and Y is over the item when clicked. Same as with any button.

 

If you are using a engine you should have some events for this. I will be able to provide better info when I know what you are using.

 

Edit: I now see the Unity tag.

Just make the Skin a Unity button, that way it will work the same.

If the skin is on a 3D object as a display, use a ray cast.

Advertisement
7 hours ago, NeroGame said:

i've tried several ways

What have you tried?

Are you able to get a button that does anything working in Unity? If yes, what specifically about the shop/unlock problem are you stuck on?

Hello to all my stalkers.

Im using unity and im developping for android !

and for the button i tried one that unlock and set but thats not what i want i want that when the player tap the screen the skin is bought and equipped

9 minutes ago, NeroGame said:

i tried one that unlock and set but thats not what i want i want that when the player tap the screen the skin is bought and equipped

What is the difference between "unlock and set" vs "bought and equipped"?

Hello to all my stalkers.

nothing really same thing dont know why i said it like that but its the same

Advertisement
7 minutes ago, NeroGame said:

nothing really same thing dont know why i said it like that but its the same

So again, what did you actually try?

Did you try something and it didn't work? If so, what did you try and what about it didn't work?

Or did you not try anything, you just not know where to start?

Hello to all my stalkers.

i dont know how to start how to link between the screen touch and the unlock/set thing

12 minutes ago, NeroGame said:

i dont know how to start how to link between the screen touch and the unlock/set thing

So let's start from the very beginning: Do you know how to create a button in Unity which calls a script function?

Hello to all my stalkers.

yes yes i create buttons and use the onclick event to call a script

 

This topic is closed to new replies.

Advertisement