BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Switchable in-game files using key input

Go down

Switchable in-game files using key input Empty Switchable in-game files using key input

Post by NakanoS Tue Feb 09, 2021 4:53 am

Greetings. Long time i didn't came here. Just asking simple yet very helpful if applied.

Is there in any way, we can add an key input for changing or switching between files that applied in an object or a route? If this can be applied in some object files or even, the csv files, i can imagine how useful this thing for any developers and players. With this method we can produce switchable tracks, in-game livery (or any texture) changing, etc.

(Maybe) a quick example in both animated and csv routes:

[Object]
States = car A.b3d , car B.b3d
StateFunction = inputkey
[*]

> Explanation: "*" is the key binding (keyboard) and while simulation begins starts with 0, every the key pressed once, value + 1, and just cycling along the state files. This function smiliar with script below. 

[Object]
States = car A.b3d , car B.b3d
Statefunction = value == 0
RefreshRate = (every time key binding pressed)

Meanwhile for the route itself:

$input( platform1.txt ; platform2.txt ; platform-n.txt : * )

> Explanation : " $input " command will be load some included files, and can be switched or changed by pressing * key while in simulation once. This command is smiliar with text below.

$include( platform$rnd(1;n).txt ; * key pressed)

Maybe the key binding is not necessary at the command but can should be adjustable in key configuration at main menu. So it also can be "inputkey" only.

P.S. if there's smiliar kind of command please tell me, as i can't make any ATS files and don't know how to make one. This concept is available at certain ATS file but never worked anymore now as newer main program won't load the file. Just hoping this can be realized without making custom ATS file.
NakanoS
NakanoS

Posts : 23
Join date : 2017-11-09
Age : 24
Location : Bandung, Indonesia

http://javvasharyo.weebly.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum