From 48cd8419bb274345fe386d47843f9aa16910e090 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 27 Sep 2017 11:35:22 -0400 Subject: lua-scripted wandering --- xml/entities.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'xml/entities.xml') diff --git a/xml/entities.xml b/xml/entities.xml index 72431dc..aecae45 100644 --- a/xml/entities.xml +++ b/xml/entities.xml @@ -50,7 +50,19 @@ - + + countdown = 0 + velx = 0 + + update = function() + if (countdown == 0) then + countdown = 5000 + math.random(0, 2000) + velx = (math.random(0, 3) - 1) * 0.004 + end + countdown = countdown - 1 + return velx, 0 + end + -- cgit v1.2.3