Howdo I Get an Obj Bullet to Work after Changing Obj Locatio

Get help using Construct 2

Post » Fri Dec 30, 2016 7:06 pm

I have been working on something in Construct 2 for awhile and for whatever reason if I have an object that has bullet enabled and working like normal and then I do "Set Position to(x,y)" the bullet seems to stop working. The object moves to the new position but bullet does nothing.

I have tried disabling and enabling the bullet,, change angle of motion, bullet speed and acceleration and nothing seems to help.

Am I misunderstanding what set position is doing?
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Dec 30, 2016 7:13 pm

I just made a very simple capx and couldn't reproduce the issue. It is likely something in your events that is causing it. Try stripping your project down until you get it to work correctly. Or you can post your capx and we'll take a look for you.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Dec 30, 2016 8:16 pm

ok thanks...damn it. :)
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Dec 30, 2016 8:30 pm

I am guessing this is happening because I am trigger an event to happen when Value = 2. At Value =2 it is doing Set Position(x,y) thus it keeps hitting that position over and over again until the value does not = 2.

I did a test where I did an object create instead and the object just kept recreating itself. How do you have an action only run one time when using a variable?

I made a work around where I had more than variable but man that is a pain...thought there would be an easier way.
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Dec 30, 2016 8:37 pm

OH I found another condition If object is outside of layout...that might make my event easier to use.
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Dec 30, 2016 8:49 pm

Can you add System > Trigger once while true under your variable condition?
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Fri Dec 30, 2016 8:54 pm

Burvey wrote:Can you add System > Trigger once while true under your variable condition?


Brilliant! I totally forgot about that command...I came up with this crazy 3 object and 2 variable solution in the past and thought...I cannot believe this is not an easier way! :)

Thanks...My bullet is doing something wonky but I should be able to sort that out!
B
9
S
2
Posts: 104
Reputation: 975

Post » Fri Dec 30, 2016 9:03 pm

You're welcome. Good luck.
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests