it seems like i had an error in the post, but it was correct in the code...
the purchase sprite is A0, not AC, AC is the last of thoose Var2's, that give the engine's proper directional sprites (mainly an active panto and/or red/yellow headlights)
trying to obtain coding skills - anyone i can ask?
Moderator: Graphics Moderators
Re: trying to obtain coding skills - anyone i can ask?
I think this is what it should be...
The variable 40, Position in consist and length of consist, would take the following value for a carriage in position 2 of a 6 carriage long train:
If you want to use only the bb value, the position counting from the rear of the train you need to do the following:
The *** steps do the following modifications to the value of variable 40:
Code: Select all
eight real sprite Action 1's plus one for the purchase list
nine action 2's;
AA = Engine forward direction
A0 = Purchase list sprite
AB = Engine reverse direction
B0 = Middle PAX wagon
B1 = First PAX Wagon
B2 = Last PAX Wagon
C0 = Middle Mail Wagon
C1 = First Mail Wagon
C2 = Last Mail Wagon
// VarAction2: MAIL
-1 * 0 02 00 C3 81 40 08 FF 01 C2 00 01 01 C0 00
-1 * 0 02 00 C4 81 40 00 FF 01 C1 00 01 01 C3 00
// VarAction2: Pax
-1 * 0 02 00 B3 81 40 08 FF 01 B2 00 01 01 B0 00
-1 * 0 02 00 B4 81 40 00 FF 01 B1 00 01 01 B3 00
// VarAction2: Panto at the Back
-1 * 0 02 00 AC 81 40 08 FF 01 AA 00 00 00 AB 00
// Action 3:
-1 * 0 03 00 01 46 01 FF A0 00 AC 00
-1 * 0 03 00 81 5B 00 B4 00
-1 * 0 03 00 81 5F 00 C4 00
Code: Select all
00 05 04 01
(00 nn bb ff)
Code: Select all
-1 * 0
02 // action2
00 // feature 00 (trains)
B3 // action2 id B3
81 // type 81 (general variable, access the lowest byte only) ***
40 // variable 40 (position in and length of consist) ***
08 // varadjust 08 (shift variable 8 bits to the right and use and mask ***
FF // and mask FF (use all bits) ***
01 // number of ranges 01 (1 range)
B2 00 // action2 id for first range
01 // range 1 lower bound
01 // range 1 upper bound
B0 00 // default action2 id
Code: Select all
00 05 04 01 // variable 40
01 // lowest byte (ff)
04 // shift 8 bits/1 byte to the right (bb)
04 // and mask
Re: trying to obtain coding skills - anyone i can ask?
Well, a little off topic (or not), but try to improve the wiki while you learn and gather info on other places / from people
will help others that might want to learn code.
(Me myself is considering to learn a little about it, but I have too much to do IRL right now
)
will help others that might want to learn code.
(Me myself is considering to learn a little about it, but I have too much to do IRL right now

"Last night, I laid on my back in my bed, staring at the stars above, and wondered; where the heck is the roof?"
Who is online
Users browsing this forum: No registered users and 18 guests