• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Some script issues

narko

vertrauenswürdig ~
Joined
Oct 19, 2008
Messages
1,317
Solutions
2
Reaction score
132
Location
Unknown
Hello,
I want to see if I could help.
I have a script of more than 300 positions.

The record in a addEvent I,
Would it be possible to put them all into one line or something that shortened.

addEvent:
p1 = local getThingfromPos (m._1) <- m.1 is a position (reaches m.302)

I want every 0.2 seconds run that script (adding and removing an item)
As if I was moving the item (like a car)

Thank you.
 
Moving an item like this:
Code:
function start()
addEvent(moveItem, 200, doCreateItem(1111,{x=500,y=700,z=7}), 320);
end
local function moveItem(item, steps)
if (steps == 0) then doRemoveItem(item.uid) return true; end
local x = getThingPosition(item);
x.x = x.x+1;
doTeleportThing(item.uid,x);
addEvent(moveItem, 200, item, steps-1);
end
 
Back
Top