Created
April 9, 2012 18:09
-
-
Save warmist/2345104 to your computer and use it in GitHub Desktop.
Foot finding...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec=df.global.world.items.other.ANY_CORPSE | |
pos=df.global.cursor | |
unit_id=-1 | |
for k,v in pairs(vec) do | |
if v.pos.x==pos.x and v.pos.y==pos.y and v.pos.z==pos.z then | |
print("corpse pieces with unit_Id:"..v.unit_id) | |
unit_id=v.unit_id | |
end | |
end | |
if unit_id~=-1 then | |
for k,v in pairs(vec) do | |
if v.unit_id==unit_id then | |
v.pos.x=pos.x | |
v.pos.y=pos.y | |
v.pos.z=pos.z | |
end | |
end | |
else | |
error("corpse or its piece not found") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment