How do I create animations for 9-Patches

Get help using Construct 2

Post » Tue Nov 03, 2015 3:45 pm

Hi. Let's say I wanna have three types of Dialogue boxes without having to switch between 3 9-Patches cause I want my code to be automated via functions (For exemple, I only would have to call a function "OpenDialogue" to launch an "Opening" anmation for the dialogue). Is there a way to do this?

After thinking, I thought that I would have a transparent 9 Patch and 3 other invisible ones that would constantly be on top of it and that I would set visible on needed. Is that a good idea? Wouldn't it cause lag at a certain point?
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 228
Reputation: 3,388

Post » Tue Nov 03, 2015 3:52 pm

Why not just create the one needed when needed?
You are already talking about using a function, so you would only need a parameter or variable to do so..
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 » Tue Nov 03, 2015 3:54 pm

Yeah, but that would make my code about 3 or 4 times longer :s
Anyway, that's the first solution I considered :p
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 228
Reputation: 3,388

Post » Tue Nov 03, 2015 4:08 pm

skymen wrote:Yeah, but that would make my code about 3 or 4 times longer :s
Anyway, that's the first solution I considered :p


I'm not sure why the code would become so much longer and why that would be a problem, but well..
If you know how to do it and doing it another way gives issues you can always change it, right?
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 » Wed Nov 04, 2015 4:08 pm

Yep, that's what I finally did :)
It would make my code longer because I would have to check for my "animation" variable then create the wanted object. Unless you can create an object via an expression (that would be better actually :D)
My addons:
[PLUGIN]Value Monitor
[PLUGIN] Text Alignement
[BEHAVIOR]Timescale Ratio
[BEHAVIOR]Polar Coordinates
[PLUGIN]Action Sequence
[BEHAVIOR]Action Sequence
[BEHAVIOR]Instance Variable Control
B
35
S
6
G
2
Posts: 228
Reputation: 3,388


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests