|
Post by Dragontear on Jan 11, 2007 16:06:22 GMT -5
Not too sure if this is actually a bug or error, and it's alittle hard to describe so bare with me;
Whenever i place some specimens into a map i'm working on, then save map and start KF etc,-when the match starts, the wave begins straight away and the 'cool-down time' is displayed, when the rest time ends, another wave is spawned and so on.
Very nice and all, except one thing, the game does not wait for the enemies to be killed, it just carries on the rest period and wave spawn over and over again continiously without a break, this is fine if you want a real struggle, but not otherwise.
When the specimens in said map are removed in the editor etc, the game works normally.
Can anybody explain a way to fix this or at least explain why it does so?
|
|
|
Post by mrmedic on Jan 11, 2007 16:39:08 GMT -5
I am currently working on a map containing a Specimen. It all works normally. I can't quite see what you mean...
|
|
|
Post by Dragontear on Jan 11, 2007 16:49:01 GMT -5
Bleh, Nothing bad to worry about, it's just odd, i mean that the rest periods come without a pause at all, like the game just 'ignores' the time between the rest periods.
Or somthing. *Shrugs*
|
|
|
Post by Abyx on Jan 13, 2007 11:19:33 GMT -5
The planted zombies throw off the system so it thinks there's no time left inbetween waves.
Oh, and Medic? Sarah DOES mess up the waves.
|
|
|
Post by mrmedic on Jan 13, 2007 17:41:19 GMT -5
Sarah gets added with the specimen numbers. But along with that KF seems to add in one normal specimen as well. Which makes it all good.
|
|
|
Post by Doyora on Jan 13, 2007 20:10:20 GMT -5
Sup w/ the italics? and, why doesn't it screw w/ the waves, when kalkus's does? I used to have a clot in the boiler on wasteyard, but all that did was make it so that @ the end of waves, -1 specs were remaining.
|
|
|
Post by Dragontear on Jan 19, 2007 9:16:28 GMT -5
Tis a late reply i know, but is there anyway to use the system normally without messing it up -after dropping specmins into the map?
I'm trying to reflect a DRF team being dropped into the thick of things kinda scenario.
*Gives muffin to the next poster*
|
|
|
Post by Seras Victoria on Jan 19, 2007 13:50:10 GMT -5
Monster factories to spawn them, used them in my map
|
|
|
Post by Dragontear on Jan 19, 2007 14:37:24 GMT -5
Can you tell me how to find/use them? Since i never used a monster factory actor before.
|
|
|
Post by Seras Victoria on Jan 19, 2007 16:21:58 GMT -5
Make a subclass of navigationpoint, call it "Spawnpoint" in the actor browser and paste this //============================================================================= // SpawnPoint. // For use with a ThingFactory or CreatureFactory. // by SuperApe -- Feb 2006 //============================================================================= class SpawnPoint extends NavigationPoint placeable; Then make one of the "Keypoint" and call it "Thingfactory" and paste //============================================================================= // ThingFactory // Spawns items. // by SuperApe -- Feb 2006 //============================================================================= class ThingFactory extends Keypoint placeable;var() class<Actor> Prototype; // The class of actors produced by this factory. var() int MaxItems; // The maximum number of active actors from this factory at any time. If it is a creature factory, new creatures will only produced either initially, or when a creature dies, to get back up to maxitems until the factory capacity is reached. var() int Capacity; // The maximum number of actors this factory can ever produce (-1 = no limit). After reaching this limit, the factory shuts down. var() float Interval; // Average time interval between spawnings. var() name ItemTag; // Tag given to items produced at this factory. var() bool bFalling; // Non-Pawn items spawned should be set to falling. var() enum EDistType { DIST_Constant, DIST_Uniform, DIST_Gaussian } TimeDistribution; // DIST_Constant : Constant interval (always equal to Interval) // DIST_Uniform : Uniform interval (random time between 0 and 2 x interval) // DIST_Gaussian : Gaussian distribution, with mean = Interval var() bool bOnlyPlayerTouched; // Only player can trigger it. var() bool bCovert; // Only do hidden spawns (when no player is looking at the spawnpoint in question). var() bool bStoppable; // Stops producing when untouched. var array<SpawnPoint> SpawnSpot[16]; // Possible start locations.
var int CurrentItems; var int CurrentCount; var bool bReadyToSpawn; var bool bPlayerTouching;
function PostBeginPlay() { local int i; local SpawnPoint SP;
Super.PostBeginPlay();
// Find the associated SpawnPoints. forEach AllActors( class'SpawnPoint', SP, Tag ) { SpawnSpot[i] = SP; i++; if ( i>15 ) break; } if ( SpawnSpot[0] == None ) Destroy();
if ( ItemTag == '' ) ItemTag = Name;
bReadyToSpawn = true; if ( !bStoppable && !bOnlyPlayerTouched ) SpawnIt(); }
function SpawnIt() { local int i, n, r; local Actor Item;
// Make sure this factory is ready to go. if ( SpawnSpot[0] == None || Prototype == None || MaxItems <= CurrentItems || ( Capacity > 0 && Capacity <= CurrentCount ) ) return;
if ( SpawnSpot[1] != None ) { for ( i=0; i<16; i++ ) if ( SpawnSpot[i] != None ) n++;
i = 1; r = ( FRand() * n ); while ( ( bCovert && SpawnSpot[r].PlayerCanSeeMe() ) || SpawnSpot[r].taken ) { if ( i > 16 ) { SetFactoryTimer(); return; // Try again later. } i++; r = ( FRand() * n ); } } Item = spawn( Prototype, self, ItemTag, SpawnSpot[r].Location, SpawnSpot[r].Rotation ); if ( Item == None ) { SetFactoryTimer(); return; // Spawn failed. Try again later. } TriggerEvent( SpawnSpot[r].Event, SpawnSpot[r], None );
if ( Pickup(Item) != None ) Pickup(Item).bDropped = true; // Limit spawned pickups to one item. if ( bFalling ) { if ( Pickup( Item ) != None ) Pickup( Item ).bOnlyReplicateHidden = false; Item.SetPhysics(PHYS_Falling); Item.Velocity = vect( 0,0,0 ); }
bReadyToSpawn = false; CurrentCount++; CurrentItems++;
if ( !bStoppable ) SetFactoryTimer(); }
function SetFactoryTimer() { local float Gaus, Mult, Bias;
if ( TimeDistribution == DIST_Constant ) { SetTimer( FMax(Interval, 0.1), false ); return; } if ( TimeDistribution == DIST_Uniform ) { SetTimer( FMax(( FRand() * 2 ) * Interval, 0.1), false ); return; } if ( TimeDistribution == DIST_Gaussian ) { Gaus = ( FRand() * 2 * Interval ); Bias = 0.27; // Seems like a good number to me. Mult = ( Bias * abs( Sin( PI * (Gaus/Interval) ) ) * ( ( Interval - Gaus ) / abs( Gaus - Interval ) ) ) + 1; Gaus *= Mult; SetTimer( FMax(Gaus, 0.1), false ); } }
function ItemCount() { local int i; local Actor A;
forEach AllActors( class'Actor', A, ItemTag ) i++;
CurrentItems = i; }
function Timer() { ItemCount();
if ( Capacity > 0 && CurrentCount >= Capacity ) { Destroy(); // Shut down. return; }
if ( CurrentItems < MaxItems ) { bReadyToSpawn = true; AttemptSpawn(); } else if ( !bStoppable ) SetFactoryTimer(); // Try again later. }
function AttemptSpawn() { if ( bStoppable && bOnlyPlayerTouched && !bPlayerTouching ) { SetFactoryTimer(); // Try again later. return; }
if ( bReadyToSpawn ) SpawnIt(); }
event Touch( Actor Other ) { ItemCount();
if ( bOnlyPlayerTouched && ( Pawn( Other ) == None || Pawn( Other ).Controller == None || Other.IsA('Monster') ) ) return;
bPlayerTouching = false; if ( bOnlyPlayerTouched && Pawn( Other ) != None && Pawn( Other ).Controller != None && Pawn( Other ).Controller.bIsPlayer ) bPlayerTouching = true;
if ( bStoppable || ( bOnlyPlayerTouched && bPlayerTouching ) ) SetFactoryTimer(); }
event Untouch( Actor Other ) { local Pawn P;
if ( !bStoppable ) return;
if ( bOnlyPlayerTouched ) { if ( Pawn( Other ) != None && Pawn( Other ).Controller != None && Monster( Other ) == None ) bPlayerTouching = false;
forEach TouchingActors( class'Pawn', P ) if ( P.IsPlayerPawn() && P.Controller != None && Monster( P ) == None ) { bPlayerTouching = true; break; } }
if ( !bOnlyPlayerTouched || !bPlayerTouching ) SetTimer( 0.0, false ); // Halt. }
function Trigger( Actor Other, Pawn EventInstigator ) { ItemCount();
if ( Capacity > 0 && CurrentCount >= Capacity ) { Destroy(); // Shut down. return; }
if ( bOnlyPlayerTouched && ( Monster( EventInstigator ) != None || EventInstigator.Health < 1 ) ) return;
SetFactoryTimer(); }
Finally, compile changed, the rest explains it'self
|
|
|
Post by mrmedic on Jan 19, 2007 18:34:59 GMT -5
And don't compile all scripts...otherwise...well...It's like saving the mylevel package...twice.
There's also an alternative way...*Keeps everyone in suspense*
|
|
|
Post by Dragontear on Jan 19, 2007 19:46:02 GMT -5
Thankees to you Laramee *Gives muffin and hug* I shall attempt this, and see what goes wrong-i mean what happens. *Raises eyebrow at MrMedic* Evil edit: Ah, damm, it appears that the map i used the thing factory actor on has now and utterly buggered up, can't load the map in the Editor, and cannot play it either. Not-so-evil edit-2:Mwah, found and saved another version of said lost map, no damage.
|
|
|
Post by Seras Victoria on Jan 20, 2007 12:12:37 GMT -5
Oh.. dang forgot to say the package had to be "mylevel" so you saved it with your map. Stupid of me -_-
|
|
|
Post by Dragontear on Jan 20, 2007 12:15:22 GMT -5
*repeatingly alaps forehead with a steel chair*
Duh...i'll got back to you on that one, i'll see if this works.
|
|