Working deathmatch, link in post

rsdrsd Join Date: 2003-02-11 Member: 13405Members
edited April 2010 in NS2 General Discussion
<div class="IPBDescription">Lua ftw!</div>Ok so I've got basic (VERY basic) deathmatch working.

I currently don't have a real internet line, so using my mobile phone to post this. As such the testing I've done is 2 clients running on my pc.

Please let me know if it works as intended.

What it has:

- health counter in hud
- lousy death animation
- respawn after 10 seconds
- dead/alive indicator in hud
- score

What it needs:
- maps with spawn points spread out
- everything else

BACK UP YOUR LUA FOLDER
Then overwrite with this.
Please post feedback :)

<a href="http://www.mediafire.com/file/n2dywn02xzz/ns2-dm.zip" target="_blank">http://www.mediafire.com/file/n2dywn02xzz/ns2-dm.zip</a>

Dirty hack disclaimer:
I'm on my way out, so I had to rush this. It's a series of dirty hacks intended to get something vaguely functional out there. It can and will be done far better than this.
«13

Comments

  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    Good work. Mouse inverted is kinda ######, you can fix it in Player.lua though.
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    Oops yeah forgot to note that. Mouse is inverted in my Player.lua

    Feel free to change it if it suits you better.
  • nadylinadyli Join Date: 2007-11-01 Member: 62791Members, Squad Five Blue
    Awe ... wait for it!... some. Now just code skulk in and we're ready to roll.
  • PhasePhase Join Date: 2003-11-18 Member: 23149Members, Constellation
    how did you know about the command "Game.instance:KillPlayer()"? I've been trying to find all the built-in functions and whatnot.
  • CatCopCatCop Join Date: 2003-08-28 Member: 20296Members, Constellation
    This community just doesn't take no for an answer,
    We'll have a very crappy hack of NS Combat up and running via the community before we even see NS2 Alpha!
  • KazterKazter Join Date: 2003-08-12 Member: 19481Members, Constellation
    Combine the work of rsd and the guy that is working on bringing multiple character models into the engine and we might actually have a passable DM between Marines, Skulks, and Builder Bots. Of course I believe they will all be shooting LMGs at eachother!
  • ZekZek Join Date: 2002-11-10 Member: 7962Members, NS1 Playtester, Constellation, Reinforced - Shadow
    edited April 2010
    Anything is possible within the confines of the official artwork, so making skulks bite is definitely not out of the question, especially if the animations/sounds are in there. People could even figure out wallwalking. Though the current maps get you stuck all over the place.
  • CatCopCatCop Join Date: 2003-08-28 Member: 20296Members, Constellation
    <!--quoteo(post=1765348:date=Apr 10 2010, 11:35 AM:name=Kazter)--><div class='quotetop'>QUOTE (Kazter @ Apr 10 2010, 11:35 AM) <a href="index.php?act=findpost&pid=1765348"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Combine the work of rsd and the guy that is working on bringing multiple character models into the engine and we might actually have a passable DM between Marines, Skulks, and Builder Bots. Of course I believe they will all be shooting LMGs at eachother!<!--QuoteEnd--></div><!--QuoteEEnd-->

    YES.
    This will be JUST like 1.02/1.03 (I believe those are the versions)

    Does anyone else remember the exploit where you could drop your bite or parasite and pick up an LMG?!
  • PipiPipi Join Date: 2009-12-09 Member: 69550Members
    Hell, just make a weld bots RPG !

    XD
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    <!--quoteo(post=1765343:date=Apr 10 2010, 06:33 PM:name=Phase)--><div class='quotetop'>QUOTE (Phase @ Apr 10 2010, 06:33 PM) <a href="index.php?act=findpost&pid=1765343"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->how did you know about the command "Game.instance:KillPlayer()"? I've been trying to find all the built-in functions and whatnot.<!--QuoteEnd--></div><!--QuoteEEnd-->

    It's not an existing function, I added it, hence the dodginess. I've only been coding in Lua for about 3 hours now, so any deviations from convention must be forgiven.

    Also you might notice PlayerSkulk.lua and BiteGun.lua. I started working on skulks but got side tracked by deathmatch. Run animations are missing from skulks sadly so I didn't see too much point in bothering. Plus implementing wall walking is a bit daunting.
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    <!--quoteo(post=1765350:date=Apr 10 2010, 06:37 PM:name=Zek)--><div class='quotetop'>QUOTE (Zek @ Apr 10 2010, 06:37 PM) <a href="index.php?act=findpost&pid=1765350"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Anything is possible within the confines of the official artwork, so making skulks bite is definitely not out of the question, especially if the animations/sounds are in there. People could even figure out wallwalking. Though the current maps get you stuck all over the place.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I've already got the biting done, that was quite simple. wallwalking...eek.

    Next up is more work on the DM + rifle butt slap though. Animations are there an logic is dead simple.

    Can someone get a public DM server up and running? I want to give it a shot before I have to head off!
  • PhasePhase Join Date: 2003-11-18 Member: 23149Members, Constellation
    Feel free to hop in vent with me. I can host whatever you need (titanium.typefrag.com 5750)


    Name: Phase in vent.
  • nadylinadyli Join Date: 2007-11-01 Member: 62791Members, Squad Five Blue
    edited April 2010
    Reg seems ###### but is playable :D
  • RulgrokRulgrok Join Date: 2007-04-04 Member: 60559Members
    How do you fix the mouse inversion?
  • PhasePhase Join Date: 2003-11-18 Member: 23149Members, Constellation
    change line 213 of Player.lua I believe back to this

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->local angles = Angles(input.pitch, input.yaw, 0.0)<!--QuoteEnd--></div><!--QuoteEEnd-->
  • RulgrokRulgrok Join Date: 2007-04-04 Member: 60559Members
    Thanks, now how do you host a server on the internet with a custom map so I can link up something for us US East Coasters.
  • RulgrokRulgrok Join Date: 2007-04-04 Member: 60559Members
    68.10.247.154:27015 try it up
  • RulgrokRulgrok Join Date: 2007-04-04 Member: 60559Members
    edited April 2010
    need to add a kill command for when players get stuck otherwise its fun :)
    I have some stuff to do but will leave up my game running so anyone can enjoy it and give my comp a small test.
    Have fun peeps

    Add me to steam!

    <a href="http://steamcommunity.com/id/rulgrok" target="_blank">http://steamcommunity.com/id/rulgrok</a>
  • ZekZek Join Date: 2002-11-10 Member: 7962Members, NS1 Playtester, Constellation, Reinforced - Shadow
    Why do I have to install the Lua myself to connect to a server? Shouldn't that all be loaded automatically?
  • jimnablazedjimnablazed Join Date: 2010-01-07 Member: 69946Members
    how do you guys even connect to each other? I don't see any servers when I go to "join".
  • CatCopCatCop Join Date: 2003-08-28 Member: 20296Members, Constellation
    ~ to open up console

    Then type

    Connect some.numbers.here.yeah:27015orwhatever
  • jimnablazedjimnablazed Join Date: 2010-01-07 Member: 69946Members
    <!--quoteo(post=1765385:date=Apr 10 2010, 06:17 PM:name=DeltaSnipe)--><div class='quotetop'>QUOTE (DeltaSnipe @ Apr 10 2010, 06:17 PM) <a href="index.php?act=findpost&pid=1765385"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Connect some.numbers.here.yeah:27015orwhatever<!--QuoteEnd--></div><!--QuoteEEnd-->errr... what?
  • ZaggyZaggy NullPointerException The Netherlands Join Date: 2003-12-10 Member: 24214Forum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester
    <!--quoteo(post=1765387:date=Apr 10 2010, 06:18 PM:name=jimnablazed)--><div class='quotetop'>QUOTE (jimnablazed @ Apr 10 2010, 06:18 PM) <a href="index.php?act=findpost&pid=1765387"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->errr... what?<!--QuoteEnd--></div><!--QuoteEEnd-->

    After pressing ~ a console shows up.
    In there you type
    connect 123.123.123.123
    Where 123.123.123.123 is the IP address of the person hosting the game.
  • jimnablazedjimnablazed Join Date: 2010-01-07 Member: 69946Members
    <!--quoteo(post=1765390:date=Apr 10 2010, 06:20 PM:name=Zaggy)--><div class='quotetop'>QUOTE (Zaggy @ Apr 10 2010, 06:20 PM) <a href="index.php?act=findpost&pid=1765390"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->After pressing ~ a console shows up.
    In there you type
    connect 123.123.123.123
    Where 123.123.123.123 is the IP address of the person hosting the game.<!--QuoteEnd--></div><!--QuoteEEnd-->
    ahh ok cheers, that makes more sense lol
  • ZaggyZaggy NullPointerException The Netherlands Join Date: 2003-12-10 Member: 24214Forum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester
    <!--quoteo(post=1765391:date=Apr 10 2010, 06:22 PM:name=jimnablazed)--><div class='quotetop'>QUOTE (jimnablazed @ Apr 10 2010, 06:22 PM) <a href="index.php?act=findpost&pid=1765391"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->ahh ok cheers, that makes more sense lol<!--QuoteEnd--></div><!--QuoteEEnd-->

    You're welcome.
    Thanks for the quick 'n dirty mod RSD.
  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    Just so you know, we are working on something very similar at <a href="http://github.com/Nayruden/ns2lua" target="_blank">http://github.com/Nayruden/ns2lua</a>
  • NeurotiqMimeNeurotiqMime Join Date: 2005-03-16 Member: 45489Members
    I'll probably check this out after a few hours of annihilating dummies.
  • Skyforger2Skyforger2 Join Date: 2007-10-19 Member: 62681Members
    <!--quoteo(post=1765411:date=Apr 10 2010, 06:58 PM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Apr 10 2010, 06:58 PM) <a href="index.php?act=findpost&pid=1765411"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Just so you know, we are working on something very similar at <a href="http://github.com/Nayruden/ns2lua" target="_blank">http://github.com/Nayruden/ns2lua</a><!--QuoteEnd--></div><!--QuoteEEnd-->


    Join up guys don't make two DM modes don't confuse the players.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    Maybe you should should be focusing on creating custom classes and overriding functionality you don't need, rather than editing existing classes that'll be overriden on the next update anyways. To get your custom gametype, there is probably a way to link it into the game. I haven't had time to mess around with it yet, but perhaps subclassing their base Game class will automatically register your custom game type as a valid game to play and add it to the list.

    Also, I disagree with Skyforger2, the more DM modes the better (to a certain point), it creates competition and drives each developer to make a better deathmatch.
  • NeurotiqMimeNeurotiqMime Join Date: 2005-03-16 Member: 45489Members
    edited April 2010
    Who has a server going?
Sign In or Register to comment.