Scripts / Video Cut Scenes are Possible

Author
Message
tomjscott
User Banned
Posted: 21st May 2014 22:58 Edited at: 22nd May 2014 16:00
Since I am withdrawing from the contest, I've decided to go ahead and post some "secret" ideas I was working on that might help others improve their entries. The first cool thing I discovered is that you can use LUA scripts to integrate video cut scenes into your game even before the story mode has video play capability.



This is simply accomplished by using the built-in os.execute command and telling it to run windows media player with a file in fullscreen mode. I'm doing this from memory so if there is a typo then I'll try to help you resolve it when I have a chance to check my code on my home computer.







Older version of wmplayer allowed additional parameters to close the player when it completed the video, but they since removed this. So, once you are done playing the video, you can kill it by executing the following code:







The problem is knowing when to kill it. You can use a timer and specify the length of the video, but there is some delay before the video plays. You can probably experiment with this and find a good buffer time for your timer.



Anyway, hope this helps others who might want this feature.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.006
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 21st May 2014 23:27 Edited at: 21st May 2014 23:28
Cool information thank you!



I do have a question, it cost nothing to be in the contest, no matter what limitations you have you can just submit whatever it is so is this withdraw more of "stance" against something? I was just wondering.
PM
tomjscott
User Banned
Posted: 21st May 2014 23:36
My withdrawal is simply due to the fact that I am unable to spend the time to finish my entry since I need to devote all my time to the other contest. I would lose 3 weeks time on the other contest if I continue with this and I only have until July 20th as it is. So, I had to decide whether winning a $250 video card and $200 compared to winning $30,000. I didn't have to think about it long. lol

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.006
BarZaTTacKS
10
Years of Service
User Offline
Joined: 3rd Feb 2014
Location:
Posted: 21st May 2014 23:47
LOL well I wish you the best of luck on that one! Yes I agree the choice would not be that hard.
PM
tomjscott
User Banned
Posted: 22nd May 2014 16:01
I had a small mistake in the code to execute wmplayer. I updated the original post with the correction.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.006
morphtactic
12
Years of Service
User Offline
Joined: 10th Oct 2011
Location:
Posted: 23rd May 2014 15:14
Thanks for the tip. What other contest? Are you talking about the IGF contest?
tomjscott
User Banned
Posted: 23rd May 2014 15:28
I don't know about the IGF contest. I'm referring to the Unity/Microsoft contest. You can learn about it from the main Unity page.

System Specs: OS - Windows 7 Home Premium 64-bit SP1, CPU - AMD Phenom II X4 945, 3.0Ghz, RAM - 8Gb DDR3, GFX Card - 2048MB NVIDIA GeForce GT 640, FPSC-R Version - Beta 1.006

Login to post a reply

Server time is: 2024-03-29 11:11:48
Your offset time is: 2024-03-29 11:11:48