How do I draw sprite in location without making a copy of it

Just started using Construct 2? Post your questions here

Post » Mon Aug 18, 2014 6:28 pm

Hello,

I'm making Star Control 2 super melee (SpaceWar!, Asteroids, whatever rings the bells most! :)), I have one SHIP -object that contains all my ship variations, but I'd need to draw ship image on to the GUI and I don't want to make a manual copy of it nor a copy in general because it adds extra work if I end up having dozens of ship variants.

Image
I wish to draw the green ship (SHIP -object default animation frame 0) to the purple square in the GUI, but I have no idea how or if it is even possible. I have tried set animation with it, but it doesn't feel like it is possible... I could try writing proper code for it via Javascript SDK but I'd like to do it within the Construct 2 if it is possible.

Best Regards,
Detocroix
B
4
Posts: 3
Reputation: 200

Post » Mon Aug 18, 2014 7:15 pm

I'm not sure what you want exactly but would giving the ship an instance variable and putting a copy on the square work?

You say you don't want a copy, but without a copy there is no sprite, so no animation..
But maybe I'm understanding your definition of a copy wrongly..
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 » Mon Aug 18, 2014 9:45 pm

detocroix wrote: I could try writing proper code for it via Javascript SDK but I'd like to do it within the Construct 2 if it is possible.


that sounds pretty over the top :) You could just have, e.g., a boolean instance variable IsGui or similar, and check for that (negated) in all your pickings.. i.e. your sprites in the UI would have that as True. But it is a pain to have to check for that everywhere. Can't help feeling there's a 3rd party plugin that might do the job but I'm not sure ..
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest