summation of the three values

Get help using Construct 2

Post » Wed Jan 07, 2015 2:10 am

I have three variables Attack1 Attack2 Attack3
Attack1 is base stat of character but Attack2 & Attack3 is optional stats (when equip second weapon or drink strenght potion)
Now in text object i want display "Attack" & Attack1 but i want always this three variables in one variable
How do it?
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:13 am

Can you give an example of what the variables represent, and what you expect the outputs to look like?
B
31
S
6
G
3
Posts: 22
Reputation: 4,764

Post » Wed Jan 07, 2015 2:15 am

@aerger sure i prepare example
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:18 am

Do you mean

"Attack " & Attack1 +Attack2 +Attack3

or maybe

"Attack " & Attack1 & ", "& Attack2 & ", "& Attack3
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jan 07, 2015 2:20 am

This is short example
You do not have the required permissions to view the files attached to this post.
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:24 am

@codah Your examples is for Text objects. Text object show one variable but in inspector Main stat of attack doesnt change.
Attack1 is main optional is rest of variables.
When i hit oponent i want decrease (if this is possible) just only main attack stat.
You do not have the required permissions to view the files attached to this post.
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:34 am

Maybe now. When Attack1 is 10 and Attack2 is 2 and Attack3 is 8
Attack1 should be 20

Right?
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:35 am

So every 0.1 seconds in your example, just set text of your text object to: "Attack " & Attack1 + Attack2 + Attack3 and that should do it, right? I think?
B
31
S
6
G
3
Posts: 22
Reputation: 4,764

Post » Wed Jan 07, 2015 2:41 am

@aerger but when i want want decrase from enemy.hp i want decrease from one variable not this three
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Wed Jan 07, 2015 2:52 am

I Starting understand its not possible
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Next

Return to How do I....?

Who is online

Users browsing this forum: ramyaswetha and 4 guests