New developer features.

General discussion about RailWorks, your thoughts, questions, news and views!

Moderator: Moderators

User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: New developer features.

Post by Acorncomputer »

Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
gnash
Established Forum Member
Posts: 320
Joined: Sun Mar 29, 2009 2:05 pm
Location: My House

Re: New developer features.

Post by gnash »

Acorncomputer wrote:Re offline mode ?

http://forums.uktrainsim.com/viewtopic. ... d#p1463904
*shrugs* :-?

I know it's no help , but , " works for me " is all I got . Cclean OS backup installed this morning , fresh D/L of the steam app and clean install of RW .. the only thing different this time as compared to other times I've done this was a prompt to D/L the correct flashplayer for steam , this is the file I've kept >> install_flashplayer10ax_gtbp_chrd_aih.exe << from Adobe ... short of pic as proof of worky I'm not sure what the problem would be ,, sounds like an OS thingie maybe ?

:)
Last edited by gnash on Fri Sep 23, 2011 12:05 pm, edited 1 time in total.
haddock1000
Virtual Rail Engineer
Posts: 2321
Joined: Wed Oct 04, 2006 11:26 am
Location: I haven't decided yet...

Re: New developer features.

Post by haddock1000 »

Sub system blueprint?? That's always existed. (has it?)

thanks,

haddock1000
Part of the Chaddock Engineering group - trying to make things easy!
User avatar
charlie99
Very Active Forum Member
Posts: 1206
Joined: Thu Feb 14, 2008 4:01 pm
Location: Earth

Re: New developer features.

Post by charlie99 »

The track rules blueprint has an option for superelevation. No luck so far in trying to get it in game though. :-?
Regards
Charlie
User avatar
Acorncomputer
Very Active Forum Member
Posts: 10699
Joined: Wed Oct 17, 2007 5:37 pm
Location: Horley, Surrey, (in a cupboard under the stairs)

Re: New developer features.

Post by Acorncomputer »

Some information on lights from Mike -

http://forums.uktrainsim.com/viewtopic. ... ead#unread
Geoff Potter
Now working on my Bluebell Railway route for TS2022
RISC OS - Now Open Source
User avatar
FoggyMorning
Very Active Forum Member
Posts: 5382
Joined: Sun Apr 25, 2010 1:16 am
Location: In the not too distant future, next Sunday A.D.

Re: New developer features.

Post by FoggyMorning »

In world editor, the space bar cycle through track properties now has 2 additional stages; I assume 1 is for superelevation and the other for track unevenness. By default, blue seems to indicate non-SE track and yellow track with SE enabled.
haddock1000
Virtual Rail Engineer
Posts: 2321
Joined: Wed Oct 04, 2006 11:26 am
Location: I haven't decided yet...

Re: New developer features.

Post by haddock1000 »

spotlight tutorial now on FAQ.

thanks,

haddock1000
Part of the Chaddock Engineering group - trying to make things easy!
User avatar
SaMa1
Established Forum Member
Posts: 430
Joined: Tue Feb 17, 2009 3:53 pm

Re: New developer features.

Post by SaMa1 »

Has the "Interior Output Display" interface control been beefed up in engine blueprint? If so it would seem that we can make interactive computer screens now.
crazyfrogbro
Established Forum Member
Posts: 304
Joined: Tue Jan 18, 2011 9:09 pm

Re: New developer features.

Post by crazyfrogbro »

I've found a new "feature"

Code: Select all

Call( "GetIsPlayer" )
Call( "GetIsEngineWithKey" )
both of these lua script commands always returns 0 if i write out them. But always return true if it put into and if like this: if Call( "GetIsPlayer" ) then
Of course that it's player controlled or not, doesn't matters :)
It's a bug not feature? :D
User avatar
RSBen
Getting the hang of things now
Posts: 33
Joined: Sat Feb 26, 2011 1:02 am
Location: Godalming

Re: New developer features.

Post by RSBen »

crazyfrogbro wrote:I've found a new "feature"

Code: Select all

Call( "GetIsPlayer" )
Call( "GetIsEngineWithKey" )
both of these lua script commands always returns 0 if i write out them. But always return true if it put into and if like this: if Call( "GetIsPlayer" ) then
Of course that it's player controlled or not, doesn't matters :)
It's a bug not feature? :D
All Call functions will return 1 for true and 0 for false. Unfortunately, 0 does not mean true in LUA. You need to write Call( "GetIsPlayer" ) == 1
Ben Laws

Any support issues, contact support@railsimulator.com. My views are my own, and do not necessarily reflect the views of RailSimulator.com.
crazyfrogbro
Established Forum Member
Posts: 304
Joined: Tue Jan 18, 2011 9:09 pm

Re: New developer features.

Post by crazyfrogbro »

I see. I've wrote a fake engine(because it's a diesel electric loco so i need it to make it's sound corrected), and a fake throttle methods(like class 86 have) to simulate real traction attributes because the built in traction physics is not so good...
So i've wanted to write a method that starts the engine script update(which calls the fake engine fake throttle, warning system simulation methods) only if the loco is controlled by train, and don't start when it controlled by AI.
If i put in to Initialise() function it always returns 0, also if i put it to Setup() method. Then the only solution is to start the Update() and check in every frame that it is a player train or not. Not so optimal, but better then calling those methods for AIs.
Perhaps another automatically invited method would be useful, something like ControlStateChange() what would be called when the loco's control state changes (player jumps in, or ai start to control it), so the GetIsPlayer can be called from there(once or just several times), and not for every update.
Kariban
Very Active Forum Member
Posts: 4478
Joined: Sun Nov 07, 2010 4:10 am

Re: New developer features.

Post by Kariban »

OnControlValueChange() perhaps? that's already there, but it only seems to work with controls that have keybindings ( something to check up on with RW3, actually ). I'm pretty sure I use GetIsPlayer in Initialise() ok, but obviously if you jump in it after the scenario start it's not going to run Initialise again. How about try adding a handler to OnControlValueChange() to check if the Startup controller changed, and check for the player there. IIRC there was definitely one control that reset when you got in.
My posts are my opinion, and should be read as such.
crazyfrogbro
Established Forum Member
Posts: 304
Joined: Tue Jan 18, 2011 9:09 pm

Re: New developer features.

Post by crazyfrogbro »

OnControlValueChange() invited everytime when something changes (not just when the player's control changed, so it's invited for simulation values too RPM, ammeter, etc).

Getisplayer works in initialise, but it always returns 0, in standard scenarios too. Probably because it's invited earlier than the player actually gets the control.
User avatar
iceman2117
Very Active Forum Member
Posts: 3287
Joined: Thu Dec 27, 2007 1:45 pm
Location: Western Germany

Re: New developer features.

Post by iceman2117 »

Thanks Derek for Information.

g'ice
Kariban
Very Active Forum Member
Posts: 4478
Joined: Sun Nov 07, 2010 4:10 am

Re: New developer features.

Post by Kariban »

crazyfrogbro wrote:OnControlValueChange() invited everytime when something changes (not just when the player's control changed, so it's invited for simulation values too RPM, ammeter, etc).
In RW3? because it definitely didn't get invoked for every control change in RW2.
My posts are my opinion, and should be read as such.
Locked

Return to “[RW] General RW Discussion”