An sprite appear in two locations where I just put one

Bugs will be moved here once resolved.

Post » Sun Nov 09, 2014 4:24 am

Problem Description
____ A concise description of your problem here ____
I have a weird mistake where a green circle sprite lunch an attack represented by a black rolling square, the code say that it only appear at de X=0, Y=0 origin point of a green sprite, but is also appear al the X=0 Y=0 of the layout, I´m searching if there something else buy can´t find an answer...

Attach a Capx
____ Upload a Capx to this post ____

Description of Capx
____ Concise description of what this CapX does ____

Steps to Reproduce Bug
[*] Step Press start
[*] Step 2 Entre Mundo 1-1
[*] Step 3 At the beginning a black rolling square appear in the X=0 Y=0 of the layout and in the code just say that it can only appear at the origin point of a green sprite.

Observed Result
____ What happens? ____

Expected Result
____ What do you expect to happen? ____

Affected Browsers
[*] Chrome: (YES)
[*] FireFox: (YES)

Operating System and Service Pack
____ Your operating system and service pack ____Windows 7

Construct 2 Version ID
____ Exact version ID of Construct 2 you're using ____187r
You do not have the required permissions to view the files attached to this post.
Posts: 1
Reputation: 906

Post » Sun Nov 09, 2014 6:05 am

Sumitting a bug as your first post is pretty gutsy :D

Anyway your code is wrong. After creating a circle, you wait 1.5 seconds. Plenty of time for the player to destroy the circle, so it no longer exists when you create the square for it. You get 0,0 at this point for Normal.X, Normal.Y.

I suggest you ask questions on the forum first :)

Edit: In general, using Wait x seconds is tricky for beginners. I would suggest using a Timer behaviour on the circle sprite, and on creation, start the timer at 1.5 seconds. Then when the timer fires, create the square. The timer won't fire if the circle has been destroyed before then.
Posts: 1,646
Reputation: 6,596

Post » Wed Nov 12, 2014 1:54 pm

Closing, there is no evidence this is a C2 bug and not just a mistake in your own events. As per the guidelines please ensure all .capx files attached to bug reports are absolutely minimal. They should be made from a new project using the fewest events and objects possible to prove the issue is not your own mistake.
Scirra Founder
Posts: 24,931
Reputation: 198,715

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests