
shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 08:21 PM
Msg. 1 of 13
now that my ascension firefight beta is released, i am working on the final, i have some questions about how to do things:
1. how would you make it so that when a ai bot dies, it doesnt drop weapons or gernades? this causes problems such as too many weapons laying on the ground, one of my pre release testors found that picking up a dead grunt's needler at a certain spot causes exceptions. also the enemy drops 4 gernades when dead making it easy to set u a chain reaction and blowing up the entire wave with one gernade, thus completely ruining the difficulty set up on the map.
2. i was wondering if someone would share with me some kind of garbage collection script that after a certain time, clears the map of all dead bodies and decals. which would help reduce lag.
any help would be appreciated, i am trying to get the map done before school starts but i dont want to rush it.
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Aug 14, 2009 09:39 PM
Msg. 2 of 13
1. Open the actor_varient tag of each AI in the map and look near the bottom for a section called 'items'. Set the 'don't drop grenades chance' field to 1. This will make sure no grenades are dropped when it dies.
Now, you can't actually stop an AI from dropping a weapon, as far as I know. The best thing you can do is just drop the weapon with absolutely no ammo, which should stop the player from being able to pick it up.
So, set both of the 'drop weapon loaded' fields as well as both of the 'drop weapon ammo' fields to 0.
2. Well, the command for collecting garbage is just (garbage_collect_now). I'm not sure about how you want to implement the garbage cleanup though, so I can't make a script yet. Just so you know, it only gets rid of garbage that the player isn't looking at.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 10:12 PM
Msg. 3 of 13
thanks for your replies, im afraid i cant fix my music menu alone, and i was planning to put the original songs that came with the menu back if i couldnt find a way to fix it before release, just contact me on xfire next time you are on. i want to make it so that after every wave, it picks up the garbage, here is my script so far: (script startup waves (show_hud_help_text true) (hud_set_help_text obj1) (hud_set_objective_text obj1) (sleep 150) (show_hud_help_text false) (sleep 200) (ai_place round_1) (sleep 20) (sleep_until ( = (ai_living_count "round_1") 0 ) ) (sleep 300) (show_hud_help_text true) (hud_set_help_text obj2) (hud_set_objective_text obj2) (sleep 150) (show_hud_help_text false) (object_create_anew ar) (object_create_anew ammo1) (object_create_anew ammo2) (object_create_anew ammo3) (sleep 200) (ai_place round_2) this is just a small segment of it, if you could show me where to put it in after every wave, i would be happy oh and if im right, the 18th is this upcoming tuesday, there is a small chance i might be gone but it all depends on what happens monday, if i am logged in on xfire, ill be there Edited by shadowslayer123 on Aug 14, 2009 at 10:14 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 14, 2009 10:16 PM
Msg. 4 of 13
Just add (garbage_collect_now) at the end of the wave, or use my garbage collect script. (script continuous collecting_garbage (garbage_collect_now) )
Just continuously collects the garbage that the player can't see.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 10:18 PM
Msg. 5 of 13
if i were to put this exact script in ^ every time in the game that you look away from a dead body, if you turn back its gone?
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Aug 14, 2009 10:24 PM
Msg. 6 of 13
Quote: --- Original message by: shadowslayer123 if i were to put this exact script in ^ every time in the game that you look away from a dead body, if you turn back its gone? Yeah. It'd be kind of weird for the average player. Same goes for blood and dropped weapons. At least, I think dropped weapons are cleaned up with the command.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 14, 2009 10:48 PM
Msg. 7 of 13
It doesn't work on weapons that you've picked up and dropped for some reason. In testing, whenever I did cheat_all_weapons, the weapons would disappear, BUT if I managed to pick one up, and then throw it away, it'd stay on the ground.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 10:50 PM
Msg. 8 of 13
will it delete weapons spawned by scripting if they are not picked up like say i use
(object_create_anew_assultrifle)
in my script and i leave the weapon there.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 14, 2009 10:51 PM
Msg. 9 of 13
No. Those weapons are unaffected. Basically, the script I posted above is the one I'm using in Firefight, except it only garbage collects every 3 seconds, and not every second. Disappearing bodies aren't really as much of a problem as is 30+ bodies lying on the floor.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 10:53 PM
Msg. 10 of 13
if i were to make it work like your firefight, i would just add (sleep_100) or something like that to the script you provided? Edited by shadowslayer123 on Aug 14, 2009 at 10:54 PM
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Aug 14, 2009 10:56 PM
Msg. 11 of 13
Odd. But, it kinda makes sense. If the player picked it up at one point, he probably knows about it and will notice if it disappears for some reason. Maybe that's why it doesn't get deleted by the command.
Doesn't make much sense though, considering he'll probably notice all the bodies and blood disappearing more than a couple weapons.
|
|
|

shadowslayer123
Joined: Feb 22, 2009
Not the american average
|
Posted: Aug 14, 2009 11:03 PM
Msg. 12 of 13
but i would rather sacrifice dead bodies and decals then have massive lag issues
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Aug 14, 2009 11:50 PM
Msg. 13 of 13
Garbage_collect_now only deletes dead bodies. The decals stay. Rasterizer_decals_flush doesn't get rid of them for some reason.
Normally, it would be a problem in a SP map, but in a arena-based Firefight map, I'd rather keep this option. During early beta tests, several people requested a script that would remove bodies to lower lag, so I implemented that script. Maybe I should have an option that allows you to disable the garbage collecting script. I just realized how I'm talking more about my map than helping you, so I'll shut up now.
As for making it more like my map, yea, all I did was put a 3 second pause between garbage collects. At first, I thought it would lag a bit when garbage collecting, like it does on my calculator, so I added a 10 second pause originally. When no lag appeared, I shorted it down to 3 seconds, and I've been a bit too lazy to change it ever since.
|
|
|