summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/dungen
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-02-24 05:01:24 -0600
committerepoch <epoch@hacking.allowed.org>2020-02-24 05:01:24 -0600
commit2fb350627ccb27cea9400da54e3c2dac0919211d (patch)
tree2d08d240181cc0227e45e6ea1af34e3737a38eb6 /share/hackvr/examples/dungen
parentfc39a67f3b227a7cbb3f737718e5dca164c64683 (diff)
downloadhackvr-2fb350627ccb27cea9400da54e3c2dac0919211d.tar.gz
hackvr-2fb350627ccb27cea9400da54e3c2dac0919211d.zip
example script of using the doors in the dungeon
Diffstat (limited to 'share/hackvr/examples/dungen')
-rwxr-xr-xshare/hackvr/examples/dungen/dunexplore.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/share/hackvr/examples/dungen/dunexplore.sh b/share/hackvr/examples/dungen/dunexplore.sh
index 389f477..0fdbc5a 100755
--- a/share/hackvr/examples/dungen/dunexplore.sh
+++ b/share/hackvr/examples/dungen/dunexplore.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
### run me with hackvr_coproc
#the $USER triangle we add first is to give us some sort of avatar to see where the camera is.
-seed=1337
+#seed=1337
echo $USER addshape 4 3 -1 0 -1 0 0 2 1 0 -1 ; echo $USER move 0 2 0
./dungen $seed | ./dun2hackvr
while read group action target;do
@@ -10,28 +10,26 @@ while read group action target;do
printf "# clicked a door! %s\n" "${target}" >&2
if printf "%s\n" "${target}" | grep ^door_open;then
derp=$(printf "%s\n" "${target}" | sed 's/_open/_CLOSING/')
- printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp} | tee /dev/stderr
- while true;do
+ printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp}
+ (
for i in $(seq 1 5 90);do
printf "%s rotate 0 +5 0\n" ${tmp}
sleep .1
done
tmp2=$(printf "%s\n" "${target}" | sed 's/_open/_close/')
- printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2} | tee /dev/stderr
- break
- done | tee /dev/stderr &
+ printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2}
+ ) &
else
tmp=$(printf "%s\n" "${target}" | sed 's/_close/_OPENING/')
- printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp} | tee /dev/stderr
- while true;do
+ printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp}
+ (
for i in $(seq 1 5 90);do
printf "%s rotate 0 +-5 0\n" ${tmp}
sleep .1
done
tmp2=$(printf "%s\n" "${target}" | sed 's/_close/_open/')
- printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2} | tee /dev/stderr
- break
- done | tee /dev/stderr &
+ printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2}
+ ) &
fi
fi
fi