Object doesn't wait and flash, how to fix?

Get help using Construct 2

Post » Sat Jan 31, 2015 2:19 pm

Hey guys, another thread by me.

This time the problem is this;
How to do.png


What happens is that the enemy gets frozen, time scaled to 0 as per events. Then what happens is the enemy waits 10 seconds without flashing and then turns invisible.

What should happen is that, enemy gets frozen and time scaled to 0 as per events, then waits 9 seconds, flashes for 1 second and returns to normal.

Anyone know how to fix this?

If I just use the flash action without the wait action, it works fine. If I use the wait action without the flash action, it also works fine.

Can anyone please help out?
You do not have the required permissions to view the files attached to this post.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sat Jan 31, 2015 3:51 pm

The wait action usually breaks the picking, specially in families. After the wait action, probably all the objects in the family will flash. Also I think the wait action doesn't affect the enemy that's been frozen since its time scale is zero (I'm just guessing here)
Image
B
58
S
13
G
6
Posts: 271
Reputation: 12,128

Post » Sat Jan 31, 2015 3:58 pm

I'm guessing the "wait" action ignores the time scale ?

If the wait is really the problem, try using a variable that you use as counter (a separate event that adds 1 every 1 second until value = 9, then reset to 0 if not frozen)
B
16
S
7
Posts: 301
Reputation: 2,726

Post » Sat Jan 31, 2015 9:55 pm

danuyos wrote:The wait action usually breaks the picking, specially in families. After the wait action, probably all the objects in the family will flash. Also I think the wait action doesn't affect the enemy that's been frozen since its time scale is zero (I'm just guessing here)


No, after the wait action just the "frozen" object which was hit by a weapon shot "flashes". My problem is that is doesn't flash correctly, and instead just turns invisible and then seemingly becomes immune to being frozen again (but that's on another set of actions I set up I think).


sgn15 wrote:I'm guessing the "wait" action ignores the time scale ?

If the wait is really the problem, try using a variable that you use as counter (a separate event that adds 1 every 1 second until value = 9, then reset to 0 if not frozen)


I might try that with the value, as for the wait action being the problem, the actual problem shows up when flash and wait are used together with a family. I think. If just wait and family, or flash and family are used, then everything works fine. Regardless of it's timescale being 0.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Sun Feb 01, 2015 4:56 pm

Order matters.
The Bool should be first since the trigger is constant, and waiting to set the bool......
Time scale should be set next
Then wait
Then restore time scale
Then flash
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Mon Feb 02, 2015 12:14 am

'Wait' does not stop the event from running again. Since you only set 'Is frozen' to false after 9 seconds, the event continues to be true for the next 9 seconds, queuing up a new wait every tick. So at 60 FPS it will queue up 540 waits which will all conflict with each other.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Mon Feb 02, 2015 1:39 am

How to do.png


Using a "Trigger Once" condition solved the flash not working, but it start flashing when the object time scale is restored.
And if I use a "wait" action for the 1 second while the flash finishes, then the object turns invisible during the wait action, restores time scale and sets frozen to false then resumes flashing.

So thanks @Ashley for reminding me that the event is continuous.

@newt

Tried that but it gets the same result as my events in this post's screen cap. I need it to flash and then when it stops flashing, runs the next actions.

I tried using a "On Flash Stopped" sub event with the restore time scale and Frozen set to false actions, but then the sub-event never runs. If I use a stop flash action after the flash action, it obviously stops the flash as soon as it starts, making the object invisible.

It'd be cool is there was a "Flash Wait" action, that puts the rest of the actions on hold while the object flashes.
You do not have the required permissions to view the files attached to this post.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Mon Feb 02, 2015 3:00 am

Behaviors do use timescale via dt.
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Mon Feb 02, 2015 7:29 am

@newt

Can you post a screencap of how you would do it?

I tried setting the timescale to something like 0.0001 and adjusting the behaviours and waits accordingly, but then my player takes damage, even though I set the damage event the way so that the player only ever takes damage from enemies if they're not frozen.

I shoot the enemy, they're frozen. I step on them, player still takes damage. This happens if the time
scale isn't 0.

If I set bullet to be disabled so they are effectively frozen, along with making their frozen instance variable set to true, then only the first enemy I shoot freezes, they rest are immune. And then when the one I shot unfreezes, he becomes immune himself. Except I don't take damage from colliding with them because they're still frozen. Even though the last action in the event is to set the "Frozen" bool variable to false.

Either I'm retarded, or something is buggy in the engine.

The closest I've gotten is making the enemy freeze, waiting 9 seconds, then the enemy unfreezes and flashes. Rather than flashing and then unfreezing.

I've tried using multiple events, triggers, a ton of different variations, I've tried not using the timer and option for an event that increases a local variable by one every second so I can use that as a timer instead of wait. NOTHING WORKS.

Honestly, I'm thinking of asking rexrainbow to build a freeze plugin where you can set a "wait to unfreeze" time along with a "flash before unfreezing" time.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Mon Feb 02, 2015 11:36 am

If you have set object time scale to 0, how is the Flash behaviour supposed to work considering it "affects the object's behaviors and its own dt expression"? Also for this reason you can't have a Timer behaviour on the object (which would be better than a Wait).
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Next

Return to How do I....?

Who is online

Users browsing this forum: Blendi1223, jatin1726, Kyatric and 27 guests