How do I use timer for X seconds for stuff?

Get help using Construct 2

Post » Fri Jul 01, 2016 5:03 pm

I currently have a boss, that I want this.

"Every 3 seconds,
Do this attack Everytick"

But I dont know how to achieve this.

I currently have this

Image
Image

What am I doing wrong?
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Fri Jul 01, 2016 6:00 pm

On start of layout->Start Timer "t" for 3 (regular)
On Timer "t"->...


You didn't name your timer to start it.
ImageImageImage
B
71
S
22
G
257
Posts: 3,788
Reputation: 142,692

Post » Fri Jul 01, 2016 7:21 pm

Create instance variable and set it as boolean. The idea is toogle the boolean every 3 seconds by switching it on or off.

showcase: https://dl.dropboxusercontent.com/u/659 ... ttack.capx
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Fri Jul 01, 2016 11:22 pm

alextro wrote:Create instance variable and set it as boolean. The idea is toogle the boolean every 3 seconds by switching it on or off.

showcase: https://dl.dropboxusercontent.com/u/659 ... ttack.capx


Wow thats great, what a lovley example.

Thank you
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Mon Jul 11, 2016 11:06 am

alextro wrote:Create instance variable and set it as boolean. The idea is toogle the boolean every 3 seconds by switching it on or off.

showcase: https://dl.dropboxusercontent.com/u/659 ... ttack.capx



Came across another problem.

Is it possible to change this so for something like this?

"For every 10 second, toggle "Angry" for X seconds?"

the current example below does not work

Image

I also tried this with a timer but can't get it to work

Image
B
21
S
9
G
8
Posts: 188
Reputation: 6,069

Post » Mon Jul 11, 2016 6:51 pm

You mean after 10s, perform attack for x second then off then loop again?
Try this one: https://dl.dropboxusercontent.com/u/659 ... _boss.capx
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Tue Jul 19, 2016 8:19 am

alextro wrote:You mean after 10s, perform attack for x second then off then loop again?
Try this one: https://dl.dropboxusercontent.com/u/659 ... _boss.capx


Excellent.

You're the best
B
21
S
9
G
8
Posts: 188
Reputation: 6,069


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound and 10 guests