How do I make an equip button?

Get help using Construct 2

Post » Thu Sep 10, 2015 3:02 pm

ok i will give a try
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 3:18 pm

should i make the
condition :
>1.animation is (1)
2.buy button is pressed
action :
>1.set instance variable (1) boolean to true
----------------------
condition :
>instance variable (1) is true
action : ....?
i dont know what should i put the action can u help me with that?
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 3:23 pm

I wouldn't do it that way because the second condition will allways be true right after the press, because C2 reads from top to bottom..
Using an else event would be a much better solution..

Regarding the action, what do you want to do?
When you know what you want to do it's much easier to tell the computer..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Sep 10, 2015 3:26 pm

sorry cuz i am asking so much questions ... this is my first time doing this in a game... is the array better? if it is then how could i use it?
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 3:41 pm

nothing is working :'( i need a solution pls
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 3:41 pm

I wouldn't know if it is better, for I don't know your game and even what exactly it is you want to do..
All I know is what you tell me..

Arrays can be of great help in many situations, but if it is nescessary or even wanted in this case depends on so many things..
If you want to learn about arrays, there are some great tutorials available..

For now you are talking about buttons with animations (which don't exist, so I guess you are using sprites instead of buttons)
You want to go from buy to equip, which you can do with a boolean (you could also do it without, depending on the difficulty of your setup)
when pushed while displaying equip you want to change the animation of your ragdoll or parts of your ragdoll (if I understand correctly)

I guess we are at the point where you should share a little bit more about how you have things set up before any further help will be what it should be, helpfull..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Sep 10, 2015 3:53 pm

Message: Ihab7 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
this is a screenshot .....
http://i.imgur.com/UmYipcV.jpg
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 4:00 pm

what u r saying is correct ...
this is correct ....
when pushed while displaying equip you want to change the animation of your ragdoll or parts of your ragdoll (if I understand correctly)
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

Post » Thu Sep 10, 2015 4:24 pm

So, it says selected joints none..
How have you set up the selecting of the joints?

Because once they are selected you can easily set an instance variable text to the animation you want to equip it with and after change the animations based on the instance variable..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Sep 10, 2015 5:54 pm

when i press the body the text change to Body and when pressed the right hand the text set to Right Hand etc..
C2 Intermediate Developer
Feel free to contact me
B
7
S
2
Posts: 111
Reputation: 908

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: MiloMasson, Yahoo [Bot] and 30 guests