Multiplayer: Ammo respawn possible while doing Co-op mode? [SOLVED]
#1 Posted 23 May 2012 - 12:48 AM
I haven't been able to find an answer to this. I'm playing multiplayer co-op and wanted to know if it's possible to have ammo respawn? It would make things a bit funner since the players wouldn't have to worry about hogging ammo.
Some ammo and items drop from monsters, but some ammo is statically placed on the map but is gone after first pickup and never respawns. Is it possibly to have either of these types respawn?
Weapons are permanent and other special items respawn (health boost, inv items). No problems with those.
I know about the "respawn" command line option but that doesn't seem to make a difference no matter what I set it to:
http://wiki.eduke32....nd_line_options
-t# Set respawn mode: 1 = Monsters, 2 = Items, 3 = Inventory, x = All
When running the multiplayer game, I always have to start the game from the main menu (selecting the game options from there), so perhaps that is overriding the command line params passed?
Thanks for any info.
This post has been edited by Rytz: 24 May 2012 - 03:06 AM
#2 Posted 23 May 2012 - 07:44 AM
#4 Posted 24 May 2012 - 03:04 AM
I never thought about the CON scripts before since I hadn't done anything with them.
I wrote a simple CON script and was able to get ammo to respawn in multiplayer. I added a couple non-ammo items to the list that didn't seem to respawn. I also reduced the respawn time from 25 seconds to 3 seconds.
I tested this tonight and it was working great.
define RESPAWNITEMTIME 90 gamevar picnum 0 0 include GAME.CON onevent EVENT_KILLIT ifmultiplayer { getactor[THISACTOR].picnum picnum switch picnum case AMMO case FREEZEAMMO case AMMOLOTS case HBOMBAMMO case SHOTGUNAMMO case BATTERYAMMO case RPGAMMO case CRYSTALAMMO case DEVISTATORAMMO case GROWAMMO case COLA case SHIELD { cstat 32768 move RESPAWN_ACTOR_FLAG spawn RESPAWNMARKERRED setvar RETURN 1 break } endswitch } endevent
This post has been edited by Rytz: 24 May 2012 - 04:07 PM
#5 Posted 24 May 2012 - 02:38 PM
#6 Posted 24 May 2012 - 04:10 PM
Hendricks266, on 24 May 2012 - 02:38 PM, said:
Good call - I left that in there from some other testing I was doing. Since I need to set RETURN to non-zero to stop from killing the actor (EVENT_KILLIT) I was using ESPAWN as a way to shorthand setting the return value. Didn't really need the separate state either.
I updated the script to simplify it.
Off-topic: Nice work on the hi-res expansions Hendricks
This post has been edited by Rytz: 24 May 2012 - 04:12 PM
#7 Posted 24 May 2012 - 04:12 PM
(Although your changed RESPAWNITEMTIME may not be used before or after its re-definition... I need to come up with a solution.)
#8 Posted 24 May 2012 - 04:19 PM
Hendricks266, on 24 May 2012 - 04:12 PM, said:
I am currently running this as a mutator (-mx) since I run the multiplayer command line.
I tried without the GAME.CON include originally but it wouldn't see "RESPAWN_ACTOR_FLAG", which isn't really a define of any kind but is instantiated by "move RESPAWN_ACTOR_FLAG" in GAME.CON .
Without the GAME.CON include I think the person would have to add the following:
include DEFS.CON include USER.CON move RESPAWN_ACTOR_FLAG
#9 Posted 24 May 2012 - 04:26 PM
Rytz, on 24 May 2012 - 04:19 PM, said:
I tried without the GAME.CON include originally but it wouldn't see "RESPAWN_ACTOR_FLAG", which isn't really a define of any kind but is instantiated by "move RESPAWN_ACTOR_FLAG" in GAME.CON .
Without the GAME.CON include I think the person would have to add the following:
include DEFS.CON include USER.CON move RESPAWN_ACTOR_FLAG
I just tried this and it loads up but it seems all actors survive death and you can't actually pick anything up. Game starts to lock up quick from all the respawning and no deaths. Doesn't look like GAME.CON is being loaded correctly.
Maybe the older version of eDuke32 isn't mutating the CON correctly? I don't know enough about it to have a good answer.
#10 Posted 03 June 2012 - 08:04 AM
This post has been edited by Paul B: 03 June 2012 - 07:33 PM
#11 Posted 03 June 2012 - 03:59 PM
Paul B, on 03 June 2012 - 08:04 AM, said:
You know I would love to but I'm pretty short on time (like many people). I work two jobs and volunteer for an indie MMO project. Maybe one day but as of right now I couldn't promise enough time to the project.
#12 Posted 03 June 2012 - 07:35 PM
This post has been edited by Paul B: 03 June 2012 - 07:42 PM