gPlayerDriving = false
gInitialised = false
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Initialise ()
Call("BeginUpdate")
end -- function Initialise
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Update ( time )
if (Call( "GetIsPlayer" ) == 0) or
(Call( "GetIsEngineWithKey" ) == 0) then
-- Player not driving. Do stuff that's only for AI locos.
gPlayerDriving = false
else
if gPlayerDriving == false then
-- Player has clicked on the loco (become its engineman)
gPlayerDriving = true;
end
end
if gInitialised == false then
-- Do the initial set up, such as turning off smoke and steam emitters.
gInitialised = true;
end
-- Do stuff that has to be done on every update.
end -- function Update
--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function Initialise ()
-- Nothing
end
function Setup ()
-- Nothing
end
function Update (interval)
-- Nothing
end
Return to Rolling-Stock Design
Users browsing this forum: No registered users and 1 guest