Sir Monster,
I need reply to this thread. You made the video name a property, not a part of the text. Without editing any of the text, I was able to put the name of my video into the property page, and then putting the video in the same folder. I was able to see the video in the games engine. For a month I have been trying to do this and I was unable to to do it with all the tutorials I found. I was so frustrated, but this worked! Thank you so much for that!
I don’t know how things work around here, but I made a template file for me to use, using your text and your modules, and your logic bricks. I want to make three templates…The first a video texture…the second …a real time camera…and the third, a static texture which can be turned on and off…I have already made the first one for myself, using the tool arrangement that I like.
My question is- Is it ok for me to make templates from your work…I do not change a single word in the texts…Or am I going beyond what I should do?
Thanks again
Now, it works. Before setting a new Texture, it just have to be cleared.
I needed to do it, because i had a strange problem.
I had a Videotextureplane with a Video running. Everytime i klicked the next Button, the video should have been changed. Well, this did not work …half. In the row of 4 Videos, every second worked, while the other two were black. If i started at position 1, video 1 and 3 worked, if i started at 2, video 2 and 4 worked.
With this addition it works fine -But there is just one Question.
Is setting to None, the same as deleting the Internat Property? I dont like to have unused data in a programm.
i hope this is a useful comment
have a nice day!
thank you sir!
thanks for this investigation. I haven’t looked what happens if the texture is supposed to be replaced. I noticed that enabling the texture again, seems to remove it. But I never investigated into this direction.
No setting None, changes the value but does not remove the property. In this situation it does not matter as this module treats None-value and non-existing property the same way. So you solution is perfectly fine.
Just in case you want to call removeTexture from a Python controller, I suggest to add the allSensorsPositive check. This way it acts like an AND controller.
Hi monster! Thanks for these scripts, it is a very elegant solution for playing videos in the BGE.
Is there any way to detect when the video stops, and change the state automatically? I’m trying to play a video loop from time to time, in my interface, and I would like the video to stop when the video finishes.
Thanks master! This is much better than my solution. I have one property which I increment every frame, but I have to set it to the right amount, and it is FPS dependent.
setup properties:
filter.color - a comma separated list of integers defining the color to filter out (does not need to be blue)
filter.limits - a comma separated list of integers defining the color limits (whatever that means)
Remarks:
I discovered some annoying problems when running in GLSL mode. The textures were still replaced as expected. Unfortunately at all three cubes.
The fix was to replace the meshes with a new cube - pretty strange, but it worked.