Hello
i want my door to close when it´s open and i step on one of the 2 tiles of the navigation-path-segment, that it changes.
So the door should close automatic after walking through.
how do i let the quick-scripts of these cells call the door to run it´s script?
for $door in group["Doors"] do
if $door.property["is_open"] == true then
$door.execute_script("Door", false);
end;
end;
The script-editor does not accept the line with execute script.
Than i tried a "DoorRemote"-script to directly call from the tile-script:
for $door in group["Doors"] do
if $door.property["is_open"] == true then
modify_navigation(entity[$door.property["back"]], entity[$door.property["front"]], INTERACT_ONLY);
$door.property["is_open"] = false;
if $door.property["is_hinge_left"] == true then
play_animation($door, "close 1");
else
play_animation($door, "close 2");
end;
end;
end;
This is the bauxite code, that is auto-generated from the visual nodes.
The for-loop-node somehow does not like $door as the control variable name (i only corrected it in the code above on pasting it here).
Now i found out, that this script works, when i put simply $d everywhere instead of $door
I already posted this issue at the bug reports.