Bug : particule overspawn [SOLVED]

Get help using Construct 2

Post » Fri Aug 26, 2016 1:50 pm

Okay i fix it by creating a event that always count the number of player and destroy them if they are more than 1 but it's not very "clean" cause i need to trigger it every tick. I'm searching a "softer" way to do that.

P.S. I've put trigger once EVERYWHERE but doesn't work :(
B
11
S
3
Posts: 25
Reputation: 1,110

Post » Fri Aug 26, 2016 3:01 pm

Mega is asking for a key.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Aug 26, 2016 3:47 pm

99Instances2Go wrote:Mega is asking for a key.


Unfortunately, one of the many sites I won't visit because of ads and having to wait.

OP - please try to use a site that is more friendly to those trying to help.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,419
Reputation: 59,524

Post » Fri Aug 26, 2016 3:50 pm

Would really like to scan his capx, its intriguing.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Aug 26, 2016 4:03 pm

Message: MisterAqua can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
https://www.dropbox.com /s/qp8swuvk8ielzln/Randomizor%202.capx?dl=0
(delete space) and say "no thank" if DropBox want you to sign up

I never had probleme with mega, i use it everyday and i never see pub or wait.
B
11
S
3
Posts: 25
Reputation: 1,110

Post » Fri Aug 26, 2016 6:36 pm

It happens on collison with 'Piques'.

And because you have multiple 'Piques' crowed on a dense place, Perso (player) is colliding with more then one spike in a very short time.
Each collission triggers a call to the 'mort' function.

In short: for each spike it collides with (almost at the same time) it makes a new player. And it multiplies because you are getting more and more players.

Lose all the 'trigger once' for now.
Give Perso an instance boolean 'IamDeadAllreadyDontBother' (something like that, but in your language) .. false

(In one event, 2 condtions)
On Perso collission with Piques
Perso boolean 'IamDeadAllreadyDontBother' is set ? (inverted, so if not set)
(actions)
set boolean 'IamDeadAllreadyDontBother' to true
call mort

In the the function "SpawnPerso" add the actions
Wait 0.5
set boolean 'IamDeadAllreadyDontBother' to false

I think that should do it .. code wise.
But, at the same time i think you better make a spike-sprite with animations for the colors, and frames for the amount of spikes (watch the collission polygones). Those spikes you bring in the layout (not even on runtime) only once anyway, so that should not be that much of work. Set default animation and frame in the instance properties in the layout editor.

Alternative. Those two suggestions are ways to avoid the problem.

Bur After all, your solution (fixing it after the facts the way you did) is also not that bad. Is does not harm and is not messing up code. So in fact, you solved it allready, and i understand the cause, every one happy.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Fri Aug 26, 2016 7:13 pm

Thank you !
Thank for your quick answer :)
I don't think i change frame with number of spike cause if i have a line of 42 spikes i won't make 42 frame * 10 (for all color)

Thank again, great forum with actif people :)

May i have to mark it as solved ? i don't see any button ?
B
11
S
3
Posts: 25
Reputation: 1,110

Post » Fri Aug 26, 2016 7:41 pm

You can edit the title of the first post and add [SOLVED]. Most dont bother.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Previous

Return to How do I....?

Who is online

Users browsing this forum: PROxMTswatTR, sean080 and 36 guests