How do I make a customizable sprite?

Get help using Construct 2

Post » Mon Jun 01, 2015 3:32 pm

Hi guys!
I'm making a driving game and i want to let the Player change the car color by clicking a button;
I've done these things below but when i click the button nothing happens:
Image
The game layout
Image
Frames
Image
Event i used

Please help!
B
5
Posts: 18
Reputation: 263

Post » Mon Jun 01, 2015 3:35 pm

NOte: in the event sheet it should be:
Set animation frame to 2 because we want to make it green!
B
5
Posts: 18
Reputation: 263

Post » Mon Jun 01, 2015 3:39 pm

I've tested the code in another game and it works, but in this one it doesn't work
here's the full event sheet:
Image
First 6 codes belongs to the main menu
Image
Main menu
Last edited by Shahriar on Mon Jun 01, 2015 3:49 pm, edited 1 time in total.
B
5
Posts: 18
Reputation: 263

Post » Mon Jun 01, 2015 3:42 pm

I would highly recommend to use "Tint" effect for purpose such as this.
I'm a Magician, not a Developer.
B
22
S
8
G
25
Posts: 106
Reputation: 14,294

Post » Mon Jun 01, 2015 3:48 pm

Is your animation set to speed 0?
Is there more than 1 sprite4?
Are there any other events that could be conflicting?

There should be no difference between the sprite having car-behaviour or not..
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 » Mon Jun 01, 2015 3:50 pm

XpMonster wrote:I would highly recommend to use "Tint" effect for purpose such as this.


Using the "Tint" effect is probably far more cpu intensive then just changing a frame..
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 » Mon Jun 01, 2015 3:53 pm

I see you are working with a lot of buttons, but in event 1, 2 and 3 you are not saying which button you mean when setting it enabled/disabled..
You should make a reference to the button, so the program knows which one to perform the action on..
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 » Mon Jun 01, 2015 3:54 pm

LittleStain wrote:Is your animation set to speed 0?
Is there more than 1 sprite4?
Are there any other events that could be conflicting?

There should be no difference between the sprite having car-behaviour or not..


Yes, speed is 0
There's only one sprite4
I think it belongs to the buttons in the main menu, because when i tested the game without other buttons it worked correctly :roll:
B
5
Posts: 18
Reputation: 263

Post » Mon Jun 01, 2015 3:56 pm

LittleStain wrote:I see you are working with a lot of buttons, but in event 1, 2 and 3 you are not saying which button you mean when setting it enabled/disabled..
You should make a reference to the button, so the program knows which one to perform the action on..


That's the start button, just named it button
B
5
Posts: 18
Reputation: 263

Post » Mon Jun 01, 2015 3:58 pm

Oh, you are using all different buttons..
Scrap my previous remark..

I don't see the car in your screenshot of the menu and I only see three buttons?
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

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests