Command_x does not work with passing signals :o
code:
local t = command_x(tool_build_roadsign)
local err = t.work(player_x(1), signal[j], "Modern_Signals_right")
Is there any way to make this work? ???
This should work. What error message is returned?
@Dwachs
Now I need to indicate the "ribi" so that the signal of passage points to the correct direction. :P
You have to query get_way_dirs_masked and call work until the ribis are as you like. One call to 'work' works as one click with the mouse.
Solved, thank you !!. ;D
for(local j=0;j<signr;j++){
local tile = tile_x(signal[j].coor.x, signal[j].coor.y, signal[j].coor.z)
local way = tile.find_object(mo_way)
if (!tile.find_object(mo_roadsign)){
local t = command_x(tool_build_roadsign)
while(true){
local err = t.work(player_x(1), my_tile(coord(signal[j].coor.x, signal[j].coor.y)), "Signals")
local ribi = way.get_dirs_masked()
if (ribi == signal[j].ribi)
break
}
}
}