The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on May 09, 2017, 02:40:57 AM

Title: [SOLVED] Get position in "schedule_x"
Post by: Yona-TYT 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.

(http://files.simutrans.com/index.php/apps/files_sharing/ajax/publicpreview.php?x=1440&y=372&a=true&file=coord_sch.png&t=C9i48uO9FTGEWBu&scalingup=0)
Title: Re: Get position in "schedule_x"
Post by: Dwachs 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.
Title: Re: Get position in "schedule_x"
Post by: Yona-TYT on May 20, 2017, 11:29:03 AM
Thank you, I did not know that.  :)