Count object

For questions about using Classic.

Post » Tue Dec 22, 2009 12:58 pm

Hi there

I'm new to Construct been using Fusion for some months.
Is there a event that counts items ?
I'm destroying items one by one and when they are all gone i want something to happen.

Also, does Construct or will sometime be able to export games to flash or java so it can be uploaded to the internet or phones ?

Regards
Sigurgeir
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Post » Tue Dec 22, 2009 1:09 pm

Yes. You can use this expression:
ObjectName.Count

For example,

System: Compare
Value 1: Sprite.Count
Comparison: Equal to
Value 2: 0
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Tue Dec 22, 2009 1:12 pm

[quote="eski":34jz6uaz]
Also, does Construct or will sometime be able to export games to flash or java so it can be uploaded to the internet or phones ? [/quote:34jz6uaz]

I think that's unlikely (for the time being).
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Tue Dec 22, 2009 1:40 pm

allright.. maybe one more thing about strings or textboxes..

I have a text in a box and say when i push a button i want something to add to the text in a new line.
Are there any commands like newline or something ?
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Post » Tue Dec 22, 2009 2:05 pm

Have you tried one of the tutorials? http://www.scirra.com/tutorials
Making an event to add text when pushing a button is very simple. I'm sure you'll get it after a tutorial. Also, Newline is in fact an expression you can use when dealing with strings. Did you try it? It's also listed in the system object expressions, which you can browse by double-clicking the system object icon at the bottom when entering an expression. You'd use it like this: "Text on first line" & Newline & "Text on second line"
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Dec 22, 2009 5:04 pm

Ye that worked out fine.
I noticed that there are alot of links on that tutorial site that dont work. Like the example files.

http://www.scirra.com/tutorials/examples/bustaball.cap
http://www.scirra.com/files/bumpmapping.cap
and the platform links also.
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Post » Tue Dec 22, 2009 5:36 pm

Argh, our host has disabled hosting of .cap files for no apparent reason. Uhhh... I'll get on that.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Dec 23, 2009 2:12 pm

Thanks for the heads up, those links should be working now.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed Dec 23, 2009 3:55 pm

Allright, thanks.. gonna check it out :D
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Post » Sat Dec 26, 2009 1:35 pm

Maybe one more thing.
Can i count items that are in a familie.
I cant use Family.Count because then it only counts the family giving me 1 but there are 3 items in the family.
B
7
S
1
G
3
Posts: 66
Reputation: 1,651

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests