View unanswered posts | View active topics It is currently Thu Nov 28, 2024 8:18 am



Reply to topic  [ 3 posts ] 
 Enemy Spawning at edge of map 
Author Message
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post Enemy Spawning at edge of map
I remember there was a map where the enemy actors spawned at the edge of the map without dropships, it wasn't X-wrapped. I was wondering how I would do something like this, and also if anyone knows where this map went.


Tue Feb 21, 2012 5:52 am
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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.


Tue Feb 21, 2012 7:15 pm
Profile
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post Re: Enemy Spawning at edge of map
Yeah I've looked through the tutorials before but the mission I wanted to make at the time was way too complicated for me. They have been helpful for getting the basics of the activities down, and I'll be referring to them a lot for the mission I'm working on now.


Tue Feb 21, 2012 9:33 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.025s | 13 Queries | GZIP : Off ]