Author |
Message |
Roon3
Joined: Sun May 11, 2008 12:50 pm Posts: 899
|
Re: King Assault 2P Gamemode
The code I was working is for SP, it causes spawned units to move into the base and attack. Replace the code mail posted with the offense code and it should work. (It can be found towards the bottom of the Assault.lua)
|
Tue Mar 31, 2009 8:04 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault 2P Gamemode
For the non-lua capable, use the attachment.
It also changes the activity to be one player(no split screen).
EDIT: Strange forum bug. The new post before posting message causes it to forget attachments.
|
Tue Mar 31, 2009 8:12 pm |
|
|
Aspect
Joined: Mon Apr 28, 2008 1:35 am Posts: 383
|
Re: King Assault 2P Gamemode
Ok, I put the AI into it. It wasn't working when I got it because the AI mode was sentry. But it's all fixed now and I added in a switch to turn AI off if that is what you want.
I also added in 2 more play modes, one with ronin and one with dummies. However, the starting troops are the same, either I, or someone else, will have to change the start troops code to make someone using the MakeActor function. Shouldnt take very long, but I don't have the time to do it now.
I also plan on adding more big weapons to the standard play mode, as well as a dedicated "big weapons" setting. But of course, as with all the other settings, you will be able to go into the assault.lua file and change the settings to your liking.
|
Tue Mar 31, 2009 10:21 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault 2P Gamemode
Just realized that WIN/FAIL doen't work to good. The fix is just to use the following instead of just EndActivity: Code: if(p1score > p2score) then self.WinnerTeam = 0; end if(p1score < p2score) then self.WinnerTeam = 1; end if(p1score == p2score) then self.WinnerTeam = -1; --Ties suck. end ActivityMan:EndActivity()
EDIT: Suggestion: Make a dynamic goal limit which is less than the number of seconds left. But, instead of ending it displays that like "If you do not capture the base within x, you will likely lose!". That should also increase spawn, leading to exciting endgame play, especially when one guy has a monopolistic control for a while.
|
Wed Apr 01, 2009 4:40 am |
|
|
Aspect
Joined: Mon Apr 28, 2008 1:35 am Posts: 383
|
Re: King Assault 2P Gamemode
ok, added the new ending. I wasn't exactly sure how to fix that. reuploaded
|
Wed Apr 01, 2009 10:47 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault Gamemode
Just noticed that the Stick Grenade is spawned in as a HDFirearm, not TDExplosive.
I fixed it, and out of boredom, using code from zombie cave, have made a screen light up code with included eye-rape ugly sprite. Glows just don't work as well as sprites in this case.
I also added SP support in a single .ini file that's commented out in Index.ini.
EDIT: A retarded vista thing came and nuked my ini file.
Attachments:
File comment: Fixed.
Used 7zip to compress as usual.
King Assault.rte.7z [62.71 KiB]
Downloaded 377 times
|
Thu Apr 02, 2009 2:22 am |
|
|
Shard
Joined: Sun May 18, 2008 5:02 pm Posts: 380 Location: Florida
|
Re: King Assault Gamemode
I'm haveing an error that says something about a RoofScreenFG, when I removed King assault the error was gone.
More details in Support, please look into it, I can't wait to play this.
|
Fri Apr 03, 2009 2:35 am |
|
|
ScifiSpirit
Joined: Sat Jun 16, 2007 8:04 pm Posts: 42
|
Re: King Assault Gamemode
Good job with the scene/mission. Quote: I'm haveing an error that says something about a RoofScreenFG, when I removed King assault the error was gone. Yes, wrong path in screen.ini. You can fix it yourself with notepad for example. Go to find -> replace, then find "Base.rte/Scenes/Objects/TutorialBunker/" and replace with "Tutorial.rte/Scenes/Objects/" and replace all. And btw, there are unused return values for math.floor(WhereTo) on lines 792, 821, 850, and 876 in assault.lua. Not that it prevents playing.
|
Fri Apr 03, 2009 3:13 am |
|
|
Roon3
Joined: Sun May 11, 2008 12:50 pm Posts: 899
|
Re: King Assault Gamemode
'Tis my crappy coding. I was looking for a way to round "WhereTo." (I think math.rand gives fractions. IE 2.35 won't work with if (WhereTo == 2) ) So yeah if there's of way of getting whole numbers, please tell. (I spent ~20 mins to find the "floor" thing)
|
Fri Apr 03, 2009 10:05 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault Gamemode
I think that the follow might work well: Code: whereTo = math.floor(math.random(1,3));
|
Fri Apr 03, 2009 7:26 pm |
|
|
ScifiSpirit
Joined: Sat Jun 16, 2007 8:04 pm Posts: 42
|
Re: King Assault Gamemode
Quote: I was looking for a way to round "WhereTo." (I think math.rand gives fractions. ... You don't have to do anything. Since the return values are not used, and the function is not doing anything else, the lines have no effect in the script, and you can remove them. math.random returns both decimal numbers and integers. math.random() returns decimal number between 0 and 1. (Or a real number as the documentation says). When called with arguments, it returns only integers. math.random() could return 0.54256104936011 math.random(0,3) will only return 0, 1, 2, or 3. http://www.lua.org/manual/5.1/manual.ht ... ath.randomQuote: I think that the follow might work well: Code: whereTo = math.floor(math.random(1,3)); Its end result is the same as: whereTo = math.random(3). You're just using extra function call that does not change the end result.
|
Fri Apr 03, 2009 9:39 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault Gamemode
Which would just add lag.
|
Fri Apr 03, 2009 10:59 pm |
|
|
Shard
Joined: Sun May 18, 2008 5:02 pm Posts: 380 Location: Florida
|
Re: King Assault Gamemode
Does anyone have the old version without the green/red screens?
Because things still aren't working.
|
Fri Apr 03, 2009 11:45 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: King Assault Gamemode
Like what?
To remove them, comment out screen.ini and in the lua script replace CreateAEmitter("RScreenEmitter"); and CreateAEmitter("GScreenEmitter"); with CreateAEmitter("putthenameofsomerandomuselessemiterhere");.
Not sure if CreateAEmitter("Null"); will work.
Or try use the emitters only screen.ini that I just made.
EDIT: I made a mistake
Attachments:
File comment: 7zip file.
Has only Screen.ini, without the bunker modules.
Screen.7z [785 Bytes]
Downloaded 343 times
Last edited by mail2345 on Sat Apr 04, 2009 12:55 am, edited 1 time in total.
|
Fri Apr 03, 2009 11:46 pm |
|
|
Shard
Joined: Sun May 18, 2008 5:02 pm Posts: 380 Location: Florida
|
Re: King Assault Gamemode
It still doesn't work, the exact same error pops up. I just want the previous version, If anyone has it please upload it, I don't care if I have the screen thingy or not, I just want to play.
|
Sat Apr 04, 2009 12:21 am |
|
|
|