Can't create object...need help please

Get help using Construct 2

Post » Tue Apr 10, 2012 4:42 am

Just starting out and want to learn as much by myself as possible, so looking for direction.

I have a row of sprites (balls numbered 1 to 18) set up at the bottom of my screen. I want to use drag and drop to move it to another area, which works fine. However, I want to leave a copy of the original ball in its original position. I want this because each sprite can be used multiple times.

I thought I'd have to use spawn but read elsewhere here that CreateObject may be better. Here's the code I have:

System: currentlyDragging=0
Mouse: Cursor is over sk1: sk1-set beingDragged to True
sk1: Is beingDragged: System-Create object sk1 on layer 0 at (40,400)

I'm sure I have the right layer (I only have 1), but the new sprite is never created. Is the code inserted at the wrong point perhaps?

Anyway, thanks in advance for any help.


dynot2012-04-10 04:47:07
B
6
Posts: 7
Reputation: 391

Post » Tue Apr 10, 2012 4:32 pm

Sharing your .capx might help.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Wed Apr 11, 2012 3:30 am

Hey Ashley, I figured out what the problem was and fixed it.

You're right...next time I'll add the .capx.

Thanks for replying just the same...much appreciated.
B
6
Posts: 7
Reputation: 391


Return to How do I....?

Who is online

Users browsing this forum: anty21ro, PavleNikolic and 24 guests