The International Simutrans Forum

 

Author Topic: [SOLVED] Get position in "schedule_x"  (Read 1502 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1081
    • Simutrans-BLOG
  • Languages: ES
[SOLVED] Get position in "schedule_x"
« on: May 09, 2017, 02:40:57 AM »
I need something like "schedule.entries[nr].pos" to be able to get the exact position of tile selected.

« Last Edit: May 26, 2017, 06:30:39 AM by Dwachs »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4446
  • Languages: EN, DE, AT
Re: Get position in "schedule_x"
« Reply #1 on: May 20, 2017, 08:30:01 AM »
schedule.entries[nr] is inherited from coordinates. You can work with it as if it were a 3d coordinate. E.g., it has member variables x,y,z as in schedule.entries[nr].x.
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1081
    • Simutrans-BLOG
  • Languages: ES
Re: Get position in "schedule_x"
« Reply #2 on: May 20, 2017, 11:29:03 AM »
Thank you, I did not know that.  :)