Delay logic ticks random?

I’m using the delay sensor to wait for an animation to finish before I change to another scene. But test playing it a lot of times it seems like it’s random how long it waits before cutting to the other scene. Is there some reliable way to get it to delay something a certain number of frames?

Turn on Tap and set to ever 1 tic,

0 tics = as many times as it can fire in a frame

1=Frame - Tap = 1 delay tic = 1 logic tic I think,

also, you can play actions using properties, and then just have

when property = X -------------and-------do whatever,

check this out

Attachments

3AnimationsPropertyControled.blend (458 KB)

This is seriously messed up, who came up with this system of doing things. Would it be so hard to make a delay sensor that delays X in frames and not in logic ticks. Now when I start up the main menu blend file and just let it run for 20 seconds or so and hit the button that fades out the screen. Now it won’t start up the new scene and the screen instead goes all black, but if I hit the button right after I start up the blend it moves to the next scene just fine.

It must be the delay sensor, stupid unnecessarily complicated shit brick.
http://i62.tinypic.com/20svwu8.png
There it is, what should I change on it to make it not be all buggy?

click positive


Logic ticks are frames.

Sent from my Nexus 5 using Tapatalk

Still got problems after clicking the positive button. I have test played it a lot now and it seems like depending on how long I hold down the button that execute the fading, that seem to determine when it cuts off to the new scene. If I hold down the button it seems to wait the 200 ticks if I click quickly it sometimes skips the 200 ticks and sometimes cuts away half way through the ticks.

Maybe it could be some tap button that needs to be checked on some keyboard sensor?
EDIT: No that can’t be it, tap is enabled on the keyboard sensor, is it really me or is the game engine buggy?

If you have a key setting a condition, it will continue to do so, unless you have a condition that does not allow you to initiate it again,

key------and-------property=1

is not the same as

if property=0---------and----------propertty=1
keypress-------------/

If you find yourself using a lot of delay sensors, it might be time to switch to python. Delay sensors can be a pain if you decide to change animations and/or timing.


armature = scene.objects["Armature"]

if round(armature.getActionFrame(0)) == 60:
    own.state = 1

That checks the frame of the armature object on layer 0 and if it is equal to 60, it switches an object to state 1. It’s rounded because frames are floats that don’t always land on even integers.

If you aren’t familiar with python scripting yet, I would check out some tutorials located on this site.

Here is my random animation version. LOL . It should be easier to figure out this one. We need an sine wave function or oscillator function in the logic bricks system. Right now I can’t make a logic counter from 0 to 10 and then back from 10 to 0 in 1 step increments without major complications. I agree with UnknownGuest. We need new logic bricks to simplify things by a lot and make things more direct.

Attachments

RandomAnimation 001.blend (89.3 KB)

Not sure I understand correctly, so forgive me if I get it wrong. Probably better to do it with Python.

But, sometimes I’ll use a timer to control animations or whatever. On an inactive layer, (or active layer) I’ll add an empty, on the empty I’ll add a Property > Timer.

Then on the empty, I’ll add Property sensors > interval > Between 1.000000 and 3.00000 for example, play Action, or whatever. (Also can be sent by message, or “copy property”) Between 3.000000 and 5.000000 do this other thing, and so on.

If I want it to repeat, I’ll add a property interval, between say 5.000000 and any number higher, add a Property actuator, assign 0, to property Timer. This will set the Timer back to zero.

Then I’ll spawn that Timer empty when I need it, and remove it when I don’t need it.

Yeah, I like to think out of the box :stuck_out_tongue:

Not sure if it’s the correct way to do it.

Hope this helps.