Page 1 of 2
Teleporting an object (prop)
Posted: Mon Dec 24, 2012 7:21 am
by thermalburn
I'm trying to figure out if its possible to teleport/move/delete/spawn a prop object. I want to move a statue to a different part of the room. I searched not only the forums but online as well and didnt find a sufficient answer
thanks
Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 7:48 am
by msyblade
You can use a script to destroy the original and spawn another. think it would look like this: (ish)
Code: Select all
function movestatue()
temple_goromorg_statue_7: destroy
spawn("temple_goromorg_statue", 1, 21, 10, 2)
end
the 4 numbers are: Level, x, y, facing. The xy are in the bottom right of the editor when u mouse over a square. the facing is 0=North, 1=east, 2=south, 3=west.I THINK the statues face reverse (mess with it and you''l get it)

Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 12:08 pm
by Grimwold
Just a minor correction to msyblade's code as destroy needs brackets:
Code: Select all
function movestatue()
temple_goromorg_statue_7:destroy()
spawn("temple_goromorg_statue", 1, 21, 10, 2)
end
msyblade wrote:You can use a script to destroy the original and spawn another. think it would look like this: (ish)
Code: Select all
function movestatue()
temple_goromorg_statue_7: destroy
spawn("temple_goromorg_statue", 1, 21, 10, 2)
end
the 4 numbers are: Level, x, y, facing. The xy are in the bottom right of the editor when u mouse over a square. the facing is 0=North, 1=east, 2=south, 3=west.I THINK the statues face reverse (mess with it and you''l get it)

Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 3:38 pm
by Diarmuid
And if I can add my 2cents here's grimwold's code modified for a general usage function:
Code: Select all
function moveObject(object, level, x, y, facing)
if object == nil then return false
local name = object.name
local id = object.id
object:destroy()
spawn(name, level, x, y, facing, id)
end
moveObject(temple_goromorg_statue_7, 1, 21, 10, 2)
EDIT: Modified so that it keeps the same id.
Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 3:55 pm
by msyblade
you guys rock

Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 4:10 pm
by Ixnatifual
Here's a modified version of diarmuid's general-purpose function for the hardcore. It now contains flaws that need to be fixed for it to work properly.
Code: Select all
funtcion moveObject(object, level, x, y, z, facing)
if object == "" then return false
string name = object.name
int id = object.id
object:destroy()
spawn(name, level, x, y, z, facing, id)
end
Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 4:58 pm
by Diarmuid
I really laughed out loud.

Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 5:23 pm
by Komag
that's like the biggest nerd joke ever (hint - I found it quite funny

)
Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 11:07 pm
by Xanathar
Re: Teleporting an object (prop)
Posted: Mon Dec 24, 2012 11:13 pm
by thermalburn
Lol thanks guys...i guess....
Also, to somewhat change the topic since i really dont think its necessary to start a new thread:
Is there a way i can few all the stats and stuff for the monsters? I'm trying to modify the mobs but i cant really do that unless i know what their initial base stats are. Online didnt have much; is there somewhere in the game files i can go look?