Data Realms Fan Forums
http://45.55.195.193/

Script for Spawning Actors?
http://45.55.195.193/viewtopic.php?f=73&t=30582
Page 1 of 1

Author:  ryry1237 [ Sun Mar 04, 2012 2:52 am ]
Post subject:  Script for Spawning Actors?

I've looked at some of the actor spawning mods such as the nano assembler factory as well as in game actor spawners such as the zombie spawning devices, but I can't seem to make my own actor spawning device.
The basic code I have for now is this:
Code:
function Update(self)
   local spawnactor = CreateAHuman("Soldier Heavy")

   spawnactor.Pos = self.Pos
   MovableMan:AddActor(spawnactor);
end


Is there something wrong with the code I'm using to spawn actors?

Author:  CaveCricket48 [ Mon Mar 05, 2012 1:39 am ]
Post subject:  Re: Script for Spawning Actors?

Looks like it should work to me, but there isn't any team or AI definition for the actors.

Author:  Whydoch [ Tue Mar 06, 2012 1:15 am ]
Post subject:  Re: Script for Spawning Actors?

You should look at Grif's ABomb stuff for an idea.

Author:  CaveCricket48 [ Wed Mar 07, 2012 5:45 am ]
Post subject:  Re: Script for Spawning Actors?

If I recall correctly, Grif's ABomb does not use lua.

Author:  Grif [ Sat Apr 28, 2012 2:24 am ]
Post subject:  Re: Script for Spawning Actors?

this is correct

so I would recommend not taking a look at it, actually

Author:  Asklar [ Sat Apr 28, 2012 4:48 am ]
Post subject:  Re: Script for Spawning Actors?

Also, that would create actors indefinately and very quickly.

You should put some ifs in there.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/