some suggestions for construct

Discussion and feedback on Construct 2

Post » Sun Apr 20, 2014 10:27 pm

Katala wrote:To import gif, right click on animation frames window and select import frames and select your gif file.



Other people are saying that doesn't work, so I will have to try it myself.


To show number on Sprite you could set the number images to frames, set the animation speed to 0 and just set animation frame from value. Note that you just need frames from 0-9.



But that wouldn't easily handle numbers with multiple digits, would it?
B
15
S
2
Posts: 103
Reputation: 1,178

Post » Sun Apr 20, 2014 11:25 pm

If you set some sort of id variable to those Sprites like "tens" and "singles" and use something like.
Code: Select all
For tens Set frame => floor(Variable/10)
For singles Set frame => Variable-(floor(Variable/10)*10)

There might be simpler formula, but that also seems to work ok. Variable is the number you want to show.

Although I would only use this if you have some really wacky way of showing the number and otherwise I would use Sprite font.

If that doesn't take you anywhere I would suggest posting on How do I forum. For example how do I make interface like in this image.

Personally I don't know what something like interface object should do. Isn't it quite broad concept.
B
34
S
9
G
3
Posts: 517
Reputation: 5,206

Post » Sun Apr 20, 2014 11:37 pm

Importing via that method does in fact work. Thanks for pointing that out, Katala!
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,744

Post » Mon Apr 21, 2014 12:20 am

As a side note... having two different IPs at the same time is trivial. I can login via my works VPN and my home network at the same time with two very different IPs.
B
21
S
5
Posts: 195
Reputation: 1,972

Post » Mon Apr 21, 2014 2:20 am

Katala wrote:If you set some sort of id variable to those Sprites like "tens" and "singles" and use something like.
Code: Select all
For tens Set frame => floor(Variable/10)
For singles Set frame => Variable-(floor(Variable/10)*10)

There might be simpler formula, but that also seems to work ok. Variable is the number you want to show.

Although I would only use this if you have some really wacky way of showing the number and otherwise I would use Sprite font.

If that doesn't take you anywhere I would suggest posting on How do I forum. For example how do I make interface like in this image.

Personally I don't know what something like interface object should do. Isn't it quite broad concept.


I figured you'd say something along those lines, but really, having to set the tens, ones, hundreds, thousands, etc seperately is pretty dumb. Not to mention I would need a separate object for each digit. The counter object in MMF let's you add sprites of the digits, then it automatically shows ALL the digits based on the value of the counter. It even has automatic max and min values, so you don't have to program it not to breach them (doing so is easy, but its still a nice touch and one less extra step), and it even let's you add extra zeroes on the beginning to make it look cool. I still think this would be a really good addition to construct, given how much better it is than mmf in so many other ways. :)

Also, the formula given for the tens would not work if there are more than 2 digits.
B
15
S
2
Posts: 103
Reputation: 1,178

Post » Mon Apr 21, 2014 3:20 am

Why not just use the sprite font? It does exactly what you're asking for and more.
Moderator
B
94
S
33
G
33
Posts: 3,006
Reputation: 27,744

Post » Mon Apr 21, 2014 4:39 am

Arima wrote:Why not just use the sprite font? It does exactly what you're asking for and more.


I looked at the sprite font... but I still find the other easier, because the sprite font is only one image and it needs to be carefully put together. And I don't need all the letters, only the numbers. I haven't really explored the sprite font too much, so my apologies if I seem ignorant. perhaps my problem is not knowing how to use it.


Also I want to make another suggestion. An action for "go to next layout". this way I can have only one goal object with only one event to go to the next level. currently to do that I discovered this really dumb way to achieve it:

- name all the layouts numbers so level one is named "1" , level 2 is named "2" etc.

- make a global value that is a number and at start of layout, set it to int(layoutname)+1

- when going to next layout, choose "go to layout by name" and put in str(globalvariable)

If anyone knows an easier way of doing this I would really appreciate it. Also any help on using the spritefont object would be appreciated as well, whether it be links to tutorials, or just giving a general overview of it. bear in mind that reading tutorials doesn't always help me and sometimes I still can't get it even after reading them.


edit: looked into sprite font some more, it really DOESN'T do what I want. the counter object basically let's me draw each digit in a program like macromedia fireworks, using that program's cool text effects, and then I can import each digit separately without having to worry about making the image exactly right, and without using letters.

here are some screenshots of what I want:

Image
Image
B
15
S
2
Posts: 103
Reputation: 1,178

Post » Mon Apr 21, 2014 8:56 am

Set Sprite font text => zeropad(Score, 6)

I would suggest to look trough all system expressions.
In my opinion something like Counter object is useless when it is easy to set up how you want it yourself and you get more freedom as well. Also that object should then be maintained when it is basically same than Sprite font with few variables.

On Construct 2 things tend to be more multipurpose and I think it is more intuitive approach.

I figured you'd say something along those lines, but really, having to set the tens, ones, hundreds, thousands, etc seperately is pretty dumb.

True when you don't need that and I would say you never do. Not sure if it was asked somewhere, but I might be wrong.
B
34
S
9
G
3
Posts: 517
Reputation: 5,206

Post » Mon Apr 21, 2014 11:59 am

It can be frustrating sometimes using spritefont just for score number generation or if you want your text to have better effects than Blackhornet's excellent font generator. What I would really like is C2 to support this free program. I would rather not spend a whole day setting up my bespoke shiny 3d effect font and tweaking the individual widths so there's no overlap if possible. I don't like the limitations of the mmf setup as championed above but the spritefont plugin would benefit from something like this...
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Mon Apr 21, 2014 2:51 pm

I respect what you guys are trying to say, but I still think it would be helpful.

Also I have two more requests. "Circle" option in Sine behavior, and a "set speed" action for bullet behavior (possibly also for other movement behaviors if they don't have them.

Also, did anyone see my "next layout" suggestion? It kinda got drowned in the talk about numbers and spritefonts.
B
15
S
2
Posts: 103
Reputation: 1,178

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests