How Do I Add To A Variable?

Get help using Construct 2

Post » Tue Aug 25, 2015 1:38 am

How do you add to a variable? By that I mean how do you do like (Variable Name) + (Given Number). I want it so that every time a sprite does a certain thing it adds to the variable but I don't know how to make variables add.
B
5
Posts: 18
Reputation: 269

Post » Tue Aug 25, 2015 1:47 am

There is an option under system event, "add to variable".
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Tue Aug 25, 2015 1:52 am

rekjl wrote:There is an option under system event, "add to variable".

Yeah sorry I phrased that wrong I mistook the bullet speed for a variable because I used a variable for it originally for a power thing, aaanyway, is there a way to subtract from the bullets speed? @rekjl
B
5
Posts: 18
Reputation: 269

Post » Tue Aug 25, 2015 5:30 am

Yes, you can...haha by using a variable to control the speed. For example, every tick, set bullet speed to variable1. Than from there on, just adjust the variable1 according to what you need.
B
42
S
20
G
31
Posts: 685
Reputation: 20,221

Post » Tue Aug 25, 2015 5:57 am

set object.bullet.speed = object.bullet.speed - X
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,552


Return to How do I....?

Who is online

Users browsing this forum: chrisyamao and 5 guests