How do i stop lag from an event that has ended...

Get help using Construct 2

Post » Thu Apr 04, 2013 5:45 am

HI, im new to construct and i think its the best since i first used it in my TAFE course...

I'm making a survival platform game, the layout contains caves and I've made an object (named "light") with the bullet behavior that travels down and when it collides with the stone that's exposed to the sky (as real caves are)it changes it from a darker stone to a lighter stone.. after this process occurs it lags like crazy.. i think it might be lag from the event, but the event ended, how do i stop the lag from it?

Ive tried it without these "light" objects and it only lags very minutely at certain points..

Any help would be greatly appreciated
B
3
Posts: 13
Reputation: 326

Post » Thu Apr 04, 2013 6:32 am

i just realized this post is in the wrong category.. can a forum admin please move this chat to the "how do i..." forum?

thanks
B
3
Posts: 13
Reputation: 326

Post » Thu Apr 04, 2013 8:13 am

@Shadowfox9356493 YOu may want to post a .capx file showing your issue as it will make it much easier for us to figure out where the issue is occurring. 99% of the issues with things like this usually come down to how your events were implemented or what order they take place in...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Thu Apr 04, 2013 8:38 am

As much as this would help, i don't wish to publish my game draft just yet, i like to keep my ideas to myself and my friends, but what im using for lighting the stone entrances to the caves is an invisible block called "light" that has the bullet behavior and is traveling downwards.. once it collides with dark stone the "light" is destroyed and so is the stone and a light stone is spawned in place of the dark stone.. i had the light block rotated 90 degrees so it travels downward at a speed of 80 and an acceleration of 50, i don't quite understand why this simple event lags the game so much...
B
3
Posts: 13
Reputation: 326

Post » Thu Apr 04, 2013 8:42 am

[QUOTE=Shadowfox9356493] As much as this would help, i don't wish to publish my game draft just yet, i like to keep my ideas to myself and my friends, but what im using for lighting the stone entrances to the caves is an invisible block called "light" that has the bullet behavior and is traveling downwards.. once it collides with dark stone the "light" is destroyed and so is the stone and a light stone is spawned in place of the dark stone.. i had the light block rotated 90 degrees so it travels downward at a speed of 80 and an acceleration of 50, i don't quite understand why this simple event lags the game so much...[/QUOTE]

Post at least a screenshot of these events, it's impossible to help otherwise. My guess is, you have an event that is constantly triggered and possibly spawning some items and causing lagging.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Thu Apr 04, 2013 8:50 am

Ok, but how do i post an screenshot here?
B
3
Posts: 13
Reputation: 326

Post » Thu Apr 04, 2013 9:25 am

If this is the case of an event repeating how do i stop this loop?
B
3
Posts: 13
Reputation: 326

Post » Thu Apr 04, 2013 9:45 am

You could add a condition to the trigger that checks the object to see if the object exists, or is already lit. You could set a variable and add the condition to see if it is already set.
Or use the system event, "Trigger Once while true."

Lots of ways, but they depend on your events. But actually you sound like you may have most of that covered, in that everything you were checking is destroyed.

Could you make a small demo capx that works similar to what you are doing that we can make suggestions for?

B
201
S
52
G
30
Posts: 897
Reputation: 36,621

Post » Thu Apr 04, 2013 9:55 am

[QUOTE=Shadowfox9356493] Ok, but how do i post an screenshot here?[/QUOTE]

You can upload your screenshot to imgur, dorpbox or whatever free services there are and post the link to it.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Thu Apr 04, 2013 10:00 am

I found the problem :D it WAS the event being repeated, i just tried a stop loop action and it works, it lags during the process of lighting but afterwards its back to normal.

Thanks for your help.

I'll try different ways to try and make this lighting effect consistent so if any light blocks are destroyed the dark block underneath is then lit..

If anyone has any suggestions ill try them, any help is greatly appreciated.
B
3
Posts: 13
Reputation: 326

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests