How do I add object?

Get help using Construct 2

Post » Tue Jun 17, 2014 12:18 pm

exist a function every "tot" points create a object???

no.. sure.. but i want every 10 point create object.. someone can help me?
B
5
Posts: 32
Reputation: 289

Post » Tue Jun 17, 2014 5:16 pm

Store your score in a global variable then use the modulus operator to check if it's remainder its 0.

You can then turn the score variable to 0 again or use the trigger once while true so only one object is created.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 53
Reputation: 3,335

Post » Tue Jun 17, 2014 10:24 pm

sorry i think non have understund ver good.. because in to my version of construct 2 "r172" is impossible to write your frist step

you write: system score%10 = 0 i think thi is your step..
1) add event
2)compare variable
3) i not know..

i write: system "compare variable" score% 10 = 0 and result
score = score% 10 = 0
B
5
Posts: 32
Reputation: 289

Post » Tue Jun 17, 2014 10:31 pm

You have to use System ---> Compare two values and then write what I told you before.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 53
Reputation: 3,335

Post » Tue Jun 17, 2014 10:35 pm

no work give me a infinite object....
B
5
Posts: 32
Reputation: 289

Post » Tue Jun 17, 2014 10:42 pm

Using @donelwero method here is a quick working version.

ojectevery10points.capx
You do not have the required permissions to view the files attached to this post.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Wed Jun 18, 2014 8:06 am

uff new release.. every 2 day.... 1 moment ^_^
B
5
Posts: 32
Reputation: 289

Post » Wed Jun 18, 2014 11:14 am

no is perfect.. because every multiple of 10 give me a object.. for example.. if i have 19 score and add 3 score 19 +3 is 22 points and no create a object... another question.. i have 4 object and have created 4 "system score ---> system trigger once----> because have a 4 different point but at star of game all my objects appear on the layer
B
5
Posts: 32
Reputation: 289

Post » Wed Jun 18, 2014 1:35 pm

How about this.

ojectevery10points2.capx
You do not have the required permissions to view the files attached to this post.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Wed Jun 18, 2014 2:21 pm

sorry only for understunding.. you can explain me this??
choose(1,2,3,4,5,6,7)
B
5
Posts: 32
Reputation: 289

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Buddhika, R0J0hound and 15 guests