Sprite that disappears and reappears randomly

Get help using Construct 2

Post » Sat Feb 15, 2014 8:16 am

@RamPackWobble
That's how I would do it
randomAreaOfSpawn.capx
This way you don't need to maintain a cumbersome list of strings of bounding boxes
Last edited by Yann on Sun Sep 14, 2014 7:12 pm, edited 1 time in total.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Sat Feb 15, 2014 9:35 am

@Yann.

Thank you for the capx - it is certainly more elegant than mine.

My line of thought was trying to avoid having extra sprites on the screen - I was under the impression that if you could avoid using things like hidden spawner sprites, and do it in the code, then that would be a good thing ? Then again I am also sure that having half a dozen hidden sprites will make very little difference to the speed of the game...

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
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat Feb 15, 2014 3:28 pm

@RamPackWobble
If you set their visibility to invisible, they won't impact rendering.

However, if you really want to reduce the number of object, you can run a loop on start of layout and build an Array of bounding boxes value to randomly pick from.
And destroy the sprites afterward.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Post » Sat Feb 15, 2014 4:09 pm

@Yann

Thank you for that - I am pleased to have been wrong (again) because I rather liked using sprites as zones/spawners.

Just to prove my stupidity ( in case you had any doubts ?) I was just making them with an alpha (or just giving them an opacity of zero) but leaving them visible (which I know does give the GPU a hit) rather than setting them to invisible!

I swear I learn something new nearly every day about C2 (I just wish I remembered it all) - best 70 spent on a computer program ever!
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
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sun Feb 16, 2014 2:26 am

@Yan Thanks a lot, both of you are the kind of people that are making construct thrive even more! @RamPackWobble Nope! & well said! Slicksz2014-02-16 02:30:20
B
6
S
1
Posts: 89
Reputation: 619

Post » Tue Apr 01, 2014 11:24 pm

Message: TikTik is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Yann wrote:@RamPackWobble
That's how I would do itThis way you don't need to maintain a cumbersome list of strings of bounding boxes

Hello, Yann ! I'm not on the topic, just didn't know how else could find in a private message me not to write ( Just think if you don't know, nobody knows =) because you decided to write. Please tell me, is there any way to do something, so the browser does not block pop-out window, moving from the game by reference. how to solve this problem, not only touching your browser settings ! can this be solved, without changing your browser settings ?
B
3
S
1
Posts: 23
Reputation: 398

Post » Wed Apr 02, 2014 9:37 pm

@TikTik
I'm not sure I understand what you are saying
But your browser blocking pop-ups is a security measure to avoid... well... pop-ups. So I'd say it's not possible to go around that.
B
68
S
22
G
14
Posts: 1,485
Reputation: 16,561

Previous

Return to How do I....?

Who is online

Users browsing this forum: NN81, Phacanu and 6 guests