Re: Enemy Spawning at edge of map
This should work fine though I may end up making a mistake or two:
Code:
local actor = nil;
actor = CreateAHuman("Actor name" , "actor module.rte"); -- eg. ("Soldier Heavy" , "Coalition.rte");
actor.Team = whatever team -- eg. self.CPUTeam if you've defined it
actor.AIMode = Actor.AIMODE_SENTRY; -- or Actor.AIMODE_GOTO (you have to define a waypoint for this), Actor.AIMODE_BRAINHUNT, etc.
actor.Pos = Vector(10 , y) -- y would be the value at which the actor is on the ground. You can do this using functions but I find it easier to just place an actor in scene maker and check his y coordinates in the scene's ini (though that's probably cause I don't know the functions that do it for you very well)
MovableMan:AddActor(actor)
Obviously you'll need to add values for everything but this is the basic code. It's pretty much the same as spawning an actor in a dropship except you add the actor instead of the dropship and you give him a position to spawn at.
Also, have you checked out
weegee's mission making tutorials? These are incredibly useful and teach you most of what you need to know for simple mission making. The rest you can learn by writing missions and getting confident at it and by looking through various activities. Personally, I'd recommend swarm for that. It deals with a lot of things the tutorials don't while not being too ridiculously complex in most places. Though ultimately what activities you should look at depends on what you're trying to achieve.
The wiki is also very useful for making missions. Specifically the
Index of all Luafiable objects and the
Listing of known functions will help you a lot.