Functions in Radio waves animation

Get help using Construct 2

Post » Sun Sep 08, 2013 2:16 am

Hello,

This project aims to show a continuous flow of schematic radio waves like the ones shown at this image:

https://www.dropbox.com/s/h9in8kqirh4tuxr/screen1.png


As you can see there is only a pack of waves show at the image and I'm trying to draw a continuous flow of them. So here is the code:

http://www.dropbox.com/s/9vryxd9lqlki5hj/screen2.png


The variable Distancia is fixed. Perhaps a Loop can make it to sum 20 each time a new wave is created. But I haven't got the way to do this.

Do you think this is well prepared to obatain a function able to create an infinite flow of waves?

Here is the project:

https://www.dropbox.com/s/xiwsagutes39bfe/smooth_radio_waves.capx]project.capx[/URL]Heptagono2013-09-08 02:26:14
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Sun Sep 08, 2013 10:09 am

I know this probably isn't what you want but just thought I'd show you:

radio-waves
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Sep 08, 2013 1:31 pm

Hey!

Yes, more or less that's my aim. Although it seems that is not made with a canvas plugin, it is interesting to know how you have managed to make the waves appear continuously.

By now, i'm calling a function with a timer. This function draws the arc with a variable "Radius". The timer also calls an increment to the radius amount. Therefore, each time that the timer is activated the radius variable increases and the arc drawing increases.

But, now it's the problem: I have only a wave. If I make a loop inside the timer calling the wave function and making:

   Radio = Radio + Loopindex("Loop")

It shoud make the radius increase each time the loop starts, but it doesn't work. I don't know if construct acts differenty as other languages or I have not found the proper way to describe that action. It's because of this that I'm asking openly to this forum.

Any idea on how to describe this procedure?
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Sun Sep 08, 2013 1:57 pm

My example just creates sprites every x seconds and scales and fades them.

I tried getting the canvas to do what you want, but I'm not very familiar with the canvas object.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Sep 08, 2013 2:09 pm

I will try to use another timer.

The first timer will call the wave function and increase the radius while cleaning the canvas at each step.

The second timer will increase the extra amount of distance to the radius.

Could work?



B
17
S
4
G
1
Posts: 105
Reputation: 1,874


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, lordsas, mekonbekon and 66 guests