Data Realms Fan Forums http://45.55.195.193/ |
|
Mission Help http://45.55.195.193/viewtopic.php?f=8&t=23154 |
Page 1 of 1 |
Author: | adwuga [ Sat Apr 23, 2011 6:42 am ] | ||
Post subject: | Mission Help | ||
I'm trying to make a mission, but I need some help. for some weird reason, the map now crashes the game whenever I try to load it. It worked fine, but when I was tinkering with the Lua and using some coordinates from it, something happened and now it makes it crash. What should I do? Can you also help me with: 1. 2. How do I make the Gamemode only let my level be loaded on the map 3. How do I make the objective be to kill the enemy brain 4. Thanks in advance for any help.
|
Author: | Abdul Alhazred [ Sat Apr 23, 2011 9:02 pm ] |
Post subject: | Re: Mission Help |
Edit: Q: How do I make the Gamemode only let my level be loaded on the map? A: Create a new area with the area editor and give it an unique name (e.g. MyArea). Then you access it from the lua script like this: Code: self.MyArea = SceneMan.Scene:GetArea("MyArea") Q: How do I make the objective be to kill the enemy brain? A: Check if the brains are alive and end the activity if all brains on a team are dead. You can use objective markers to higlight the brains. The "Zombie Cave" mission script does this below the '-- MARK THE OBJECTIVES' comment. The function Battle:UpdateActivity() has an extra 'end' in it that probably caused the crash. One more thing; in B24 each player has a number and that number is decided by controller type (e.g. mouse and keyboard is always player #0 in the default settings). But the script template you are using was written for B23 so your script won't run properly if the player is not player #0. The solution is simple. Look for the '-- Set up players' code in the StartActivity function and replace this Code: for player = 0, self.PlayerCount - 1 do Code: for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do if self:PlayerActive(player) [s]and self:PlayerHuman(player)[/s] then Looking forward to playing your mission! |
Author: | adwuga [ Sun Apr 24, 2011 5:59 pm ] | ||
Post subject: | Re: Mission Help | ||
Thanks for all the help everything worked It wasn't the extra end that caused the game to crash, but that was messing up the script and giving me console errors. what caused the game to crash was that I accidentally deleted the terrain file, but I had cortex command open while I did this, so I could still play my level until I closed it. for some reason the game wouldn't catch the missing file, until I changed the name of the .rte. I changed it back and now it works. thanks for the help. one more thing I have a few enemy actors who are supposed to attack the player's brain, but instead they attack each other. this is their spawn script Code: local soldier = CreateAHuman("Soldier Heavy" , "Coalition.rte"); soldier.Pos = Vector(1861 , 985); soldier:AddInventoryItem(CreateHDFirearm("Assault Rifle" , "Coalition.rte")); soldier:AddInventoryItem(CreateHDFirearm("Shotgun" , "Coalition.rte")); soldier.Team = self.CPUTeam; MovableMan:AddActor(soldier); adding soldier.AIMode = Actor.AIMODE_BRAINHUNT does nothing the rest of the actors are on the level, not in the script
|
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |