Page 2 of 2

Posted: 24 Dec 2006 04:08
by DaleStan

Code: Select all

70 * 14	 02 01 10 81 10 00 FF 01 50 80 01 02 FF 80
                                   ^^
I may be way off base here , but have you tried using a number in the 74..CB range? (RV IDs, not train IDs)

Posted: 24 Dec 2006 04:11
by PikkaBird
AFAIA, the callback uses the NFO ids, not the global vehicle IDs. At least, that's the way stevenh had me code the hiroshima trams test grf (which is where Sir Bob has copied the code from).

Posted: 24 Dec 2006 04:17
by DaleStan
PikkaBird wrote:(although you are calling a sound effect which doesn't exist in your grf, which will crash TTDP).
No, it won't. Specifying a sound effect that doesn't exist causes no sound to be played.

Posted: 24 Dec 2006 04:22
by PikkaBird
DaleStan wrote:
PikkaBird wrote:(although you are calling a sound effect which doesn't exist in your grf, which will crash TTDP).
No, it won't. Specifying a sound effect that doesn't exist causes no sound to be played.
Ok. I'm sure I've managed to code sound effect callbacks that crash TTDP before, although that may have been with an earlier build.

Posted: 24 Dec 2006 06:32
by Sir Bob
Okay, I've got rid of the sound effect callback but it hasn't helped at all.
My articulated trams still don't show up but non-articulated trams do.

If anyone can find something else wrong with the code please say so.

Thanks again,
Sir Bob

EDIT: Do I need to change anything to do with what DaleStan said before?

Posted: 24 Dec 2006 09:28
by PikkaBird
Hmm. Not showing at all?

... your action 3 is for a different ID from your action 0.

You probably also want to change the callback return from 50 to this vehicle's ID.

Posted: 24 Dec 2006 11:59
by Redirect Left
PikkaBird wrote: You might want to check with stevenh just where articulated RVs are at in the current build.
I checked with him a few week ago. Apparantly they do just about work, but are very buggy.

Posted: 25 Dec 2006 07:27
by Sir Bob
I've changed everything you said (I think) but it is still causing problems. I've uploaded my latest .NFO file (The problem is with the last tram)
Another weird thing was found as well, if you have the German Tram Set activated you get the tram, but only the first vehicle.
On another note my Action 4's don't work.

Once again, any help is apprecciated

Sir Bob

Posted: 25 Dec 2006 07:38
by DaleStan
Sir Bob wrote:On another note my Action 4's don't work.
the wiki wrote:language-id
The meaning of this byte depends on the GRF version of the .grf file as set in action 8.
I advise you re-read this section a couple times; you obviously missed something important in there.

And you're setting the wrong bit in prop 17.

Posted: 25 Dec 2006 15:15
by PikkaBird
DaleStan wrote:And you're setting the wrong bit in prop 17.
And the last action 0 is still setting properties for a different ID than the action 3 that precedes it...
(I think I said action 2 before, I meant action 0.)

Posted: 26 Dec 2006 05:28
by Sir Bob
What line is the property 17 on?

Posted: 26 Dec 2006 05:42
by DaleStan
The line (or lines) that contain the only action that can set properties.

This should be obvious, and there shouldn't be more than a few such lines.