Rolling boulder launch coordinates

Allow defining rolling boulder launching location in special level
lua scripts:

 des.trap({ type="rolling boulder", coord={7, 5}, launchfrom={-2, -2} });

launchfrom is relative to the trap coord.
This commit is contained in:
Pasi Kallinen
2022-03-12 18:34:40 +02:00
parent 625571062e
commit 4be6fb0df9
3 changed files with 21 additions and 1 deletions

View File

@@ -741,13 +741,14 @@ Example:
=== trap
Create a trap.
Create a trap. The `launchfrom` is relative to the rolling boulder trap coord.
Example:
des.trap({ type = "hole", x = 1, y = 1 });
des.trap({ type = "hole", coord = {2, 2} });
des.trap({ type = "web", coord = {2, 2}, spider_on_web = false, seen = true });
des.trap({ type = "rolling boulder", coord = {7, 5}, launchfrom = {-2, -2} });
des.trap("hole", 3, 4);
des.trap("level teleport", {5, 8});
des.trap("rust")