Jump to content

Herman

Mitglieder
  • Gesamte Inhalte

    1172
  • Benutzer seit

  • Letzter Besuch

Alle erstellten Inhalte von Herman

  1. That's exactly what I do. It is a simple lock. The switches and static crosses have a boolean in it code : Switch["SwitchPoint"].variables["#TSW Locked"] = true Never mind. It's just I do not understand why an non existing "thing" causes no error in the if then else. There is a misunderstanding about what I'm asking ... However, thanks a lot for your time and answer. Kind regards, Herman
  2. Maybe someone wonders why the cross is in the table. Well it has no state indeed, but still needs locking if the train comes there. So I wanted to handle switches and crosses in the same manner in the route table. The code then filters out the cross for the state, but still locks correct.
  3. Sorry, interrupt. So I forgot the = 99 position. I wonder why all is still working. In if Switch["Position"] ~= 99 then , the Switch["Position"] does not exist in the table ( if it is a static cross ) Why is there not an error ? Sorry my question was confusing. Herman
  4. Hello @Goetz, Yes I know that. Of course it has no state to switch. That's why I gave it in the route table position 99 as an non existent state. The if ... then sees the 99, and there is no change of the state. That works fine. But now I forgot to give ( in the route table ) to give this 99. I gave no position a
  5. Hello, Sorry I'm here back only to understand / learning something. Before the question a short introduction. In route locking I have also crosses which must be locked. And a static cross doess not have a position. ( unlike a track switch ) Solution : give in the table position 99 to such crosses, so they are handled as another switch, and trap in the code with an if ... then. Works fine Code -- lock the switches, crossings for i, Switch in ipairs(t) do -- a cross without position has in the list/table position 99 if Switch["Position"] ~= 99 then Switch["SwitchPoint"].state = Switch["Position"] end Switch["SwitchPoint"].variables["#TSW Locked"] = true end In a project I forgot to give the crosses the 99 position, they have none as you can see in the table : Route [2] The code is as above, but even when I looked with the analyser, it seemed there was no script error visible, and I did expect one. And it all works fine ? Is there an error or not, or did I just not seen it ? Do I overlook something ? As always thanks for reading, super thanks for an answer. Kind regards, Herman
  6. Hello Atrus, Thanks for the nice support. Kind Regards, Herman
  7. TB08 SignalG V6 v05.mbp Hello, The error is fixed. (*) But I'm not going to publish them again in the catalog. Should anyone have some interest, it can be downloaded here. Kind regards, Herman * The error was not so bad as I thought. It caused a script error, with no further consequenses for the event. That's the reason I discovered it only when use the analyse. Otherwise I would never had found it.
  8. Hello Götz and Thomas, With "only references to" from Thomas I understood that I was comparing two different things. Thanks to both ! Nice regards, Herman
  9. Hello @HaNNoveraNer You : "Those are only references to tables". A reference to the memory ( like a pointer ) I agree with you. Thanks for your answer ! Greetings, have a nice weekend. Herman (BE)
  10. Hello Simon, "storing all those container IDs is killing me ..." Do you really use ID's ? Why not the reference to the object. But still a time consuming option. Succes with your project. Greetings, Herman
  11. Hello, Maybe a more special question, but here we go. Just to see if I have a good understanding wich t comes out here : local t = layout:getVehiclesOn(signal) gives a table t with the vehicles on that track contact. ( 1 item or none ) local t = layout:getVehiclesOn($("LongTrack")) gives a table t with the vehicles on that track I want to know if there is a vehicle an the contact of the signal. In previous tests I used # for the number of items in a table. if #t ~= 0 then ( there is a vehicle on the signal , a wagon or a loc ) So far so good, my problem is solved. But t is a table, the test if t ~= {} an empty table failed, why ? Some help is welcome. Kind regards, Herman
  12. Hello, I'm back here, just take it as it is : When testing my container handling, I had also the problem that sometimes the container goes trough the other one when stacking. I alsways used an object from the list to give actions to the crane. Those objects are : a place ( on a train, on the ground ) or another container. I looked to an error in my code first, but it was only a mistake in the list : the ground position was activated (or a lower container), instead of the actual container. And of course .... . The cronological order in my list is import to find what action, so a mistake is easy there. KInd regards, Herman
  13. Hello, It is difficult to see only in your text what is going on, and even then, I'm not an expert, but there ary many experts among the members. Probably I cannot help with your specific question , but maybe ( just maybe ... ) you can find something in 911459D6-84DF-439B-AD37-E5E19B2EDE63 , a layout I published recently in the catalog. I hope somebody can give you a solution. Feel free to ask questions about my own layout, if you think it might help. Kind regards, Herman (BE)
  14. Hello, I published last days a duo signals called signalG and signalV in the catalog. I just removed them. They were based on the above topic. But there is a serious error in it. So do not use those signals if you should have downloaded them. They do not work properly. (*) Sincere apologies, Herman (BE) (*) When one opens the signal manually, and there is no train before the error occured.
  15. Hello Götz, Thanks, a logical and very elegant solution, we need only the -20 speed in this case indeed. But I did not see it ... again and again. I focused to much on "relative to direction" and the condition. I struggled longer with this one, and should come earlier to the forum. ( as you said before ... but maybe I was stubborn ) As always thank you very much, I appreciate it a lot ! Kind Regards, Herman (BE) PS. Why this question. I'm working on a project around a turntable, where I want the Loc always going backwards into the depot. Works already nice...
  16. Hello, Solution in .mdb form. Greetings, Herman (BE)Conditional change of direction.mbp
  17. Correcttion autodecelleration must be : track contact with Decelerate to 0 km/h
  18. Hello dear members, I have a solution for the following but ... not entirely happy with it. Task : A track contact with autodecelleration = 0 is triggered by a train. After some time : If the train comes forward on that contact, he must go back to the other direction. If the train comes backwards on that contact, he has to go on further in the same direction. Suggestions for a more elegant solution ? If possible without capturing the current speed in the begin. I did not find another solution to know if the train is triggering with positive speed, or negative speed. Are there ? Probably yes. Thanks for reading - suggestions, Herman (BE)
  19. Thank you Goetz, Even if that's the case, fair enough. Nice regards, Herman
  20. Hello, just a question, I used this way. But Tutorial layouts is not there for me. Can somebody give a little explanation for the box, upload as a draft .. Greetings, Herman
  21. Thank you @Goetz, how could I ever doubt Kind regards, Herman
  22. Hello @Goetz, thank you for the answer, this brought me to another reletad issue : are track objects changed with edit usable by others after publishing ? Hello fellow members, If I use edit to make by example a virtual switch to use for walking people. ( works nice of course ). The virtual switch keeps the same id nr as the virtual straight in the catalog. This was the start of the switch. Suppose a layout ( with the virtual switch in it ) is published on the internet, is it for others working as a switch ( as I hope ) or as a straight ? Just to be sure. Thanks in advance for a short answer. I posed the same question aside in another topic ( primitive "ebene") but it was maybe not a clear question from me or it was probably overlooked by other members. Greetings, Herman
  23. Hello, , Just to reduce the number of objects ( tracks ) I sometimes edit a track ( rail ) to another length with edit and geometry len/rad. I did the same with an ordinary street from the catalog, and it works not ( only in the beginning of the street ). However good news : extends with the Gizmo works fine. Probably - if not my mistake - a known problem. I just wanted to give the remark here to other members. Greetings, Herman note : changing in the bad solution the "model only" to "road"; only makes the middle track available. TEST street.mbp
  24. @Goetz Hallo, Ich habe auch vergessen, dass eine Tabelle auch Zeichenfolgen als Namen hat. Schande Ich habe getestet : local w = { x=26.1, y=26.1, z =0 } $("Buche").transformation.position = w $("Label01").text = w["x"] / 87 -> 0.3 = 0,3 m = 300 mm in HO Viel gelernt, dankeschön.
  25. @Goetz Danke vielmals, Herman
×
×
  • Neu erstellen...