Gamepad Issue

Get help using Construct 2

Post » Tue Dec 24, 2013 12:28 pm

I see this mistake a lot with new developers. well maybe not mistake, but just not really effective and doesn't behave the way the developer wants.

Don't nest an Every X seconds under anything. Only use every X seconds at the root. I know it sound like it should work as in

While condition is met then on every X seconds do this.

but that usually doesn't.

Instead you need work another way of handling the problem of next time.


If Gamepad(loopindex) Right Shoulder is down and array(loopindex) < time
then
shoot
array(loopindex) = time + 0.25

This is psuedo code of course. But that's what your looking for.
B
88
S
18
G
9
Posts: 2,455
Reputation: 14,928

Post » Tue Dec 24, 2013 2:09 pm

The problem is that since it's in a loop, you're basically only checking for each controller every 25 seconds (I think).

You could use some sort of cooldown (either a timer behaviour or a plugin) together with the loopindex. Wish I could help more but I don't have two controllers anymore, I'm afraid ):
B
119
S
41
G
40
Posts: 835
Reputation: 27,790

Previous

Return to How do I....?

Who is online

Users browsing this forum: alextro, christina, Kyatric, omnipaws and 9 guests