Jump to content

[LE3] Cinema Bars, Scene Loaded, & Random


Rick
 Share

Recommended Posts

I've created 6 more scripts for the flowgraph. 1 is cinema bars, another is a way to start things off in the flowgraph when the scene is loaded, another is just a passthrough, and the others are variations of Random. In this example video I've combined 6 of my scripts (SceneLoaded, Sound, CinemaBars, Timer, Random3, & PassThrough) and changed the Player script for DA to enable/disable input to create this effect.

 

 

Below is the flowgraph that made this interaction. I add a delay timer so that it gives the scene time to show itself for a second or so before we play the sound and give back input control to the player.

 

Description:

 

Follow the flow left to right. It all starts with SceneLoaded node. That disables the player input and shows the cinema bars. Show will trigger it's output which enables the timer to give us a 1 second buffer to show the scene. When the timer ticks (1 second in this case) it disables itself and then goes into the In of Random3, which will fire 1 of the 3 outputs. All 3 outputs go to their own sounds. When either are completed it goes through what I'm calling a PassThrough. This is just a nicer way to organize things and will pass the flow right through. The PassThrough Out output then hides the cinema bars and enables the player. Without the PassThrough we'd have way more lines because OnComplete to each sound would have to enable player input and hide cinema bars. I think when using Random nodes PassThroughs can help keep things cleaner as the

flow comes back together.

 

 

http://www.leadwerks.../videos/_/-r201

 

CinemaBarsLoadRandom.png

 

I would love to see modules and comments in the flowgraph. When things get complex, just like in any other language, we need better ways to organize them. We wouldn't put everything inside int main() and the same would hold true for flowgraphs. I would put this entire section into it's own module and the module would have a visual node itself that I would put into the main flowgraph to show it should run that module. Ideally I think when inside a module it would have a Start node that has an output called Run or something that we can hook up to start the flow of that module. This and comments would really help organize the flowgraphs.

Link to comment
Share on other sites

Yes some sort of sub Flowgraphs balck box, you could open or close.

Josh said Flowgraphs was not the way to write a full game.

So i'm mainly for Lua Scrips, programmers can program them and attach them to entities.

Perhaps it can be more simple for people to attach some "Third Person Controller and Cam" to a character for example and just adjust variables in the panel.

Stop toying and make games

Link to comment
Share on other sites

Josh said Flowgraphs was not the way to write a full game.

 

The above is far from a full game. It's one interaction/event in the level and it could use it's own module for organization. This is no different than programming. Organization is needed to keep things easy to read and cleaner. Also Josh is at a point where he doesn't see the full benefit of a flowgraph. At one point he also didn't see the full benefit of his engine being in C++, but he does now.

 

 

So i'm mainly for Lua Scrips, programmers can program them and attach them to entities.

 

That's what all those scripts above are. They are scripts attached to entities.

 

 

Perhaps it can be more simple for people to attach some "Third Person Controller and Cam" to a character for example and just adjust variables in the panel.

 

I agree. However, that doesn't mean that script can't fire some outputs and have some inputs for other stuff. Like my modification to player.lua that enables/disable input. If you have a cut scene in your game you'll want to be able to trigger that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...