Data Realms Fan Forums http://45.55.195.193/ |
|
Lua? spawning stuff http://45.55.195.193/viewtopic.php?f=1&t=16165 |
Page 1 of 1 |
Author: | Valeoncat [ Sun Aug 09, 2009 9:42 pm ] |
Post subject: | Lua? spawning stuff |
So im pretty new to this whole lua buisness, and the wiki is alittle bit over whelming. at the moment i would like to know how to spawn a actor(if its possible) and also how to spawn one on either red/green team. can anyone help? or is this not possible? |
Author: | Kyred [ Sun Aug 09, 2009 9:47 pm ] |
Post subject: | Re: Lua? spawning stuff |
Here's an example on how to make an AHuman. Code: local actor = CreateAHuman("Dummy"); actor.Team = 0; --Red team actor.Pos = Vector(0,0); --Will move him to the top right cornor of the scene. MovableMan:AddActor(actor); |
Author: | Valeoncat [ Sun Aug 09, 2009 9:49 pm ] |
Post subject: | Re: Lua? spawning stuff |
mhm thanks. so vector is the location where they wil be placed? |
Author: | Geti [ Sun Aug 09, 2009 9:56 pm ] |
Post subject: | Re: Lua? spawning stuff |
yes, and it can be relative, for example, if you wanted it to be placed 20 pixels down from whatever was running the script, you could use actor.Pos = self.Pos + Vector(0,20) |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |