Allowing for shutdown at end of scenario?

Discussion about RailWorks scenario creation.

Allowing for shutdown at end of scenario?

Unread postby OldProf » Tue Mar 11, 2014 6:53 pm

Now that we're getting engines with complex and supposedly realistic start-up and shut-down procedures, I'm wondering how to build them in to scenarios. The start-up sequence is just a matter of allowing "enough" time for all of the various steps, although with each potential driver taking a different amount of time to go through them AI timing will be even more difficult. How about allowing for shut-down sequence at the end of the scenario, fully or partially? In order to run successfully, a standard scenario must have an end marker and when that marker is reached, the scenario ends and vanishes, without allowing for any shut-down procedures. Ideas, fellow scenario writers?
Tom Pallen (Old Prof)

{Win 10 Home 64-bit; Intel Core i7 6700 @ 3.40GHz; 16.0GB Single-Channel @ 1063 MHz (15-15-15-364); 2047MB NVIDIA GeForce GTX 960}
User avatar
OldProf
 
Posts: 2743
Joined: Wed Sep 09, 2009 10:09 am

Re: Allowing for shutdown at end of scenario?

Unread postby robbit » Tue Mar 11, 2014 10:26 pm

just add a message trigger at the end and change the time after the last action for 30 seconds or however much time you need it to hold the scenario open for
robbit
 
Posts: 838
Joined: Fri Jul 15, 2011 11:29 am
Location: Maine

Re: Allowing for shutdown at end of scenario?

Unread postby PapaXpress » Tue Mar 11, 2014 10:39 pm

In the case of the GP40 the shutdown is done by switching mandatory breaker off, or by pressing the shutdown button, but under the hood we are hooking into the standard RW control 'Startup'. The GP20 and SD45 do the same thing (though the buttons maybe different). If you script your LUA to wait for the engine to have its Startup value set at -1 (1 is started) then you should be able to do what you want.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Allowing for shutdown at end of scenario?

Unread postby Chacal » Tue Mar 11, 2014 11:22 pm

The scenario lua script?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6549
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Allowing for shutdown at end of scenario?

Unread postby PapaXpress » Tue Mar 11, 2014 11:38 pm

Yes. You can script scenarios. You can start, stop, and do any number of things against an engine. I am sure you can do even more than that.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Allowing for shutdown at end of scenario?

Unread postby artimrj » Wed Mar 12, 2014 8:52 am

Yeah the cinemtaic deal stops you from doing anything with the controls while you are flying around. It has a command for that and a command for giving control back to you. If we only had a list of all the things it could do.
Bob Artim - Generation X²
I don't have a PHD, I have a DD214... Freedom carries sacrifice
I'm crawling in the dark looking for the answer
User avatar
artimrj
 
Posts: 4721
Joined: Sun Jan 31, 2010 3:07 pm
Location: Beaver, Pennsylvania

Re: Allowing for shutdown at end of scenario?

Unread postby mrennie » Wed Mar 12, 2014 9:01 am

Another way to do it is to put a call like this in your engine script, a certain time after the shutdown:

SysCall(“ScenarioManager:TriggerScenarioComplete”, "Engine shutdown complete")

You can also end a scenario when there's an engine failure:

SysCall(“ScenarioManager:TriggerScenarioFailure”, "You blew up the engine")
User avatar
mrennie
 
Posts: 3214
Joined: Wed May 30, 2012 12:22 pm

Re: Allowing for shutdown at end of scenario?

Unread postby PapaXpress » Wed Mar 12, 2014 12:58 pm

Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone


Re: Allowing for shutdown at end of scenario?

Unread postby OldProf » Wed Mar 12, 2014 4:14 pm

robbit wrote:just add a message trigger at the end and change the time after the last action for 30 seconds or however much time you need it to hold the scenario open for


That sounds like what I'm after . . . thanks!

As to the scripting suggestions, well, I just don't LUA. Maybe someday, but not yet.
Tom Pallen (Old Prof)

{Win 10 Home 64-bit; Intel Core i7 6700 @ 3.40GHz; 16.0GB Single-Channel @ 1063 MHz (15-15-15-364); 2047MB NVIDIA GeForce GTX 960}
User avatar
OldProf
 
Posts: 2743
Joined: Wed Sep 09, 2009 10:09 am

Re: Allowing for shutdown at end of scenario?

Unread postby PapaXpress » Wed Mar 12, 2014 4:20 pm

Honestly from what I have seen from our scenarios for the GP40 its not as complex as one you would write for a model.
Image
"Just post some random unrelated text. We have members here who can help you with that." ~ Chacal
"When all else fails, read the instructions... if that doesn't work either, try following them." ~ Old Prof
Image
The Grade Crossing - Atlanta North Project - Virtual Rail Creations
User avatar
PapaXpress
 
Posts: 5147
Joined: Sat Oct 23, 2010 10:30 pm
Location: that "other" timezone

Re: Allowing for shutdown at end of scenario?

Unread postby robbit » Wed Mar 12, 2014 5:31 pm

You're welcome!
robbit
 
Posts: 838
Joined: Fri Jul 15, 2011 11:29 am
Location: Maine

Re: Allowing for shutdown at end of scenario?

Unread postby dogrokket » Wed Apr 02, 2014 9:15 pm

mrennie wrote:


Yep, that's the one I've got !!*ok*!!

NICE! That's a helpful link. :D
Down another rabbit hole we go....
User avatar
dogrokket
 
Posts: 176
Joined: Wed May 08, 2013 2:18 pm


Return to Scenario Creation

Who is online

Users browsing this forum: No registered users and 1 guest