I have 2 scenes, both with logic. I am trying to convert all my logic as certain logic bricks cause small delays. I noticed that if I use python scripts instead, I will end up still sending messages which will lead into small delays. Is it possible to have 1 python script in one scene that does funtions for 2 objects in 2 different scenes? In other words, I won't have to be sending messages between scenes to remove the delay. If so, how would I identify an object from a separate scene? Thanks.
Can you use 1 python script for multiple GE scenes?
Yes, you can.
This has nothing to do with messages, or delays. Python is executed by a Python controller. A Python controller gets executed (as each other controller) either once or never within a single logic frame.
Messages will be transferred after the logic bricks are executed but before the next frame starts. From perspective of logic - between the frames.
That is the reason why it takes exactly one frame between sending and receiving a message.
- When you perform operations while sending a message and operations when receiving this message ... you will notify a one frame delay.
- If you do not want that, you should ensure all operations (except sending the message) react on the same event -> e.g receiving the message.
... how would I identify an object from a separate scene?
You can grab the scene and read the objects it has.