1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
[object_type]
id=track_angled_controller
ignore_collide=true
zorder=60
platform_area=0,0,25,10
#solid_area=0,0,25,10
solid_dimensions="~common"
has_feet=no
[properties]
length="length(x_1,y_1,x_2,y_2)"
set_ends="def(new_x1,new_y1,new_x2,new_y2) [set(vars.x_1,new_x1),set(vars.y_1,new_y1),set(vars.x_2,new_x2),set(vars.y_2,new_y2),fire_event(me,'create')]"
[/properties]
on_create="[
set(x, (x_2+x_1)/2),
set(y, (y_2+y_1)/2 - (length/2)),
set(draw_area, [0, 0, 25, 28, ]),
set(rotate,(angle(x_1,y_1,x_2,y_2)) ),
]"
[animation]
image=tiles/rail-tracks.png
id=normal
x=32
y=4
w=25
h=28
[/animation]
[solid]
image=tiles/rail-tracks-solid.png
id=tracks
area=0,0,25,26
[/solid]
[/object_type]
|