[Help]Random

Get help using Construct 2

Post » Tue Feb 11, 2014 2:45 pm

Hi, i'm beginer in C2 and i have a problem.

I have 2 airplanes
I use the random function to spawn on every X sec(on Y) random EChar1 and EChar2.

But in gameplay, EChar2 has more speed.
At times, EChar2 come over EChar1

Who can help me?
B
3
Posts: 9
Reputation: 218

Post » Tue Feb 11, 2014 3:56 pm

Need a little more detail and possibly a CAPX file for us to take a look at.
B
100
S
32
G
11
Posts: 1,552
Reputation: 21,612

Post » Tue Feb 11, 2014 4:07 pm

http:/s16.postimg.org/9ur8zr13p/image.jpg
http:/s4.postimg.org/q3708r8f1/image.jpg

Bug:
http:/s21.postimg.org/6p2ov99ef/image.jpg
(i can't post link on formu and i delete a "/" from link)

If you really need i will give you the CAPX file.Claudiu42014-02-11 16:08:18
B
3
Posts: 9
Reputation: 218

Post » Tue Feb 11, 2014 4:15 pm

If you are saying about the background of the smaller plane hiding the larger than you need to look at alpha. In the image editor that comes with C2 you can use the flood fill with the alpha set to 0 to remove this background.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Tue Feb 11, 2014 4:18 pm

Not the background is the problem, and without background EChar2's wing come over EChar2Claudiu42014-02-11 16:19:07
B
3
Posts: 9
Reputation: 218

Post » Tue Feb 11, 2014 4:23 pm

On your screen there is a background problem as RamPackWobble said, but you said it's a speed problem ?

How do you move the planes ? Have you checked the initial speed ?

And you should work with transparent background for your sprites :)
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Feb 11, 2014 4:52 pm

With background or without background is same problem.
http:/s1.postimg.org/d1f2wv5tr/Screenshot_2014_02_10_18_44_12.png

If EChar1 is spawned on Y(500) and EChar2 on Y(510 for example), EChar2 because have more speed, catch up and go over EChar1
B
3
Posts: 9
Reputation: 218

Post » Tue Feb 11, 2014 5:17 pm

@Claudiu4

How did you move the planes ?
Bullet behavior ?
+y every tick ?

We have no information about your movement system we cant help you ! :)
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Feb 11, 2014 5:35 pm

Yes, EChar1 and EChar2 move with Behaviro -> Bullet

EChar1 is Crated by the System on every 5 secounds on layer 1 at (random(20 , 1000) -30)
EChar1 speed = 55

EChar2 is Crated by the System on every 3.5 secounds on layer 1 at (random(20 , 1000) 1)
EChar2 speed = 95
B
3
Posts: 9
Reputation: 218

Post » Tue Feb 11, 2014 5:43 pm

Hmm, well I think I dont get your problem, it's normal if Echar2 catch up Echar 1 if the speed is greater.

If your problem is that you don't want the planes to overlap you have to change your spawn system.
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests