[Change] Playing with Lua script a little.
This commit is contained in:
parent
b3c21a5c4e
commit
2619277baf
@ -1,4 +1,21 @@
|
|||||||
function control(pilot)
|
function follow()
|
||||||
accel(1)
|
face(1,1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function goto()
|
||||||
|
v = gettarget()
|
||||||
|
face(v)
|
||||||
|
|
||||||
|
d = getdist(v)
|
||||||
|
if d < minbrakedist()*1.05 then
|
||||||
|
poptask()
|
||||||
|
else
|
||||||
|
accel(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function control()
|
||||||
|
pushtask(0, "follow");
|
||||||
|
--pushtask(0, "goto", createvect(1000, 0));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user