I am trying to write a script that will assign keybinds to sell the paper tickets that are found in the standard German buses without a ticket printer.
The ones you have to use a mouse to click on and give the relevant ticket to the passenger that are part of the main Omsi program and can not be accessed apparently.
My reason for doing this is i am using 'SIM-Dashboard', which connects android tablets to Omsi (and other driving games/sims) and allows the making of virtual 'dashboards' and other things, like an Ibis, ticket printer etc that sends data to and from Omsi.
So, i have an image of the ticket selling block on my tablet, and i have managed to write (with lots of help) the script needed to give me assignable key binds that will give the ticket i press to the passenger when they request one.
But it does not give them an actual ticket, it gives them an invisible ticket that they take, i've managed to include the tearing off the ticket sound and that's as far as i've got.
How would i go about adding the calls to show the relevant ticket's image / texture on the paytable before the passenger takes it... or show the wrong ticket until i take it back? ... basigally what happens when you moseclick a ticket in the bus, but with a key bind.
i don't mean the 'T' key bind that gives them a universal ticket, i want to be able to mis-sell tickets and have to take them back etc, as i will be doing this from my NG272 driving rig, so it's all about immersion.
My code so far:
{frame}
(L.L.TicketTimer) (L.S.Timegap) - (S.L.TicketTimer) 0 <=
{if}
-1 (S.L.GivenTicket)
{endif}
{end}
{trigger:TKT_Fahrschein_Nor}
0 (S.L.GivenTicket)
(T.L.ev_ticketsale_giveticket)
2 (S.L.TicketTimer)
{end}
{trigger:TKT_Kurzstr_Norm}
1 (S.L.GivenTicket)
(T.L.ev_ticketsale_giveticket)
2 (S.L.TicketTimer)
{end}
{trigger:TKT_Tageskarte_Nor}
2 (S.L.GivenTicket)
(T.L.ev_ticketsale_giveticket)
2 (S.L.TicketTimer)
{end}
{trigger:TKT_Fahrschein_Erm}
3 (S.L.GivenTicket)
(T.L.ev_ticketsale_giveticket)
2 (S.L.TicketTimer)
{end}
{trigger:TKT_Kurzstr_Erm}
4 (S.L.GivenTicket)
(T.L.ev_ticketsale_giveticket)
2 (S.L.TicketTimer)
{end}
Alles anzeigen
This goes in the buses 'CashDesk.osc' file, along with and entry of 'TicketTimer' in the 'CashDesk_Varlist.txt' file (the 2 second timer bit is needed otherwise i had to hold the ticket selling icon down until the passenger took the 'invisible' ticket.
i am really bad with coding, i can barely understand what is happening with the code above, and i'm asking this question here to try and get a wider audiance who can understand what i'm trying to do.