Announcement

Collapse
No announcement yet.

ThingFactory? Or how to spawn objects.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ThingFactory? Or how to spawn objects.

    I've mapped for UT99 a pretty long time.
    For a small lan i wanted to create a small AO map that spawns infinite amount of aliens (not too hard with the alienspawner) and now i m looking for a way to spawn medkits und ammo bags. I remember that you are able to spawn things in ut99 with a thingfactory. Can anyone tell me if there is an actor that does the same in ut2004?

  • #2
    i would assume there is, however if there isnt..just copy the ut99 one over to 2k4

    Comment


    • #3
      If you look in the map AO-Meat, it has aliens spawned in "waves" (so you know your progress), and there is a large stockpile of ammo and health in one of the corners. You might want to look at it. I don't think it spawns the pickups though, rather has a large number of them.

      Comment


      • #4
        Could just have little areas which pop up or open up with lots of ammo on them.
        Phalanx Campaign
        Executive CEO of NCM Mining Co. (Corvus Campaign)

        Comment


        • #5
          attach ammo boxes to movers!

          you could do the little bait thingy, where you run up to pick up a healthpack, then it quickly slides a little further away, and then you keep chasing it to a vent in the wall, then you pick it up and loads of aliens burst out

          </ot>

          Comment


          • #6
            in your Actor Classes Browser, Right Click on Triggers and select new
            set the package to "myLevel" and the actor name to "AoAmmoBagTrigger"
            add the following code, and the click the "compile changed code" button (second button on the left under tools)
            cross your fingers
            Code:
            //=============================================================================
            // AoAmmoBagTrigger.
            // Spawns an Ammo bag After RespawnTime seconds. bRespawn makes
            // it rerespawnre...
            //=============================================================================
            class AoAmmoBagTrigger extends Triggers
            	placeable;
            
            var()	float	RespawnTime;
            var()	bool	bRespawn;
            
            function Trigger( Actor Other, Pawn EventInstigator )
            {
            	setTimer(respawnTime,bRespawn);
            }
            
            	
            function Timer()
            {
            	local AoPickupAmmoBag henry;
            	
            	henry = spawn(class'AoPickupAmmoBag');
            }
            should work with any actor, just find and replace AoPickupAmmoBag with the class you want
            ..it's safer here.

            Comment


            • #7
              aye that code would work, though it could potentially create some nasty lagging infinitely repeating spawning if someone isnt careful

              Comment


              • #8
                hmm.. what if someone is careful... maybe i should limit the respawn time to 1 second max.. only way to be sure
                ..it's safer here.

                Comment


                • #9
                  yeah i can see people putting shotgun ammo on 0.01 interval on repeat

                  edit: hmm..more likely medpacks actually..

                  edit2: why not add a var() class<actor> variable so people can just put the class the want to spawn into the default properties or something too

                  Comment


                  • #10
                    Originally posted by UArchitect
                    i would assume there is, however if there isnt..just copy the ut99 one over to 2k4
                    I'm not much into scripting, do you think that would work?

                    I'll try that other actor in the meantime. Ty for the help, folks

                    Comment


                    • #11
                      i think that requires a dynamic load object thingo, I have neither the time nor the inclination to dynamically load objects for a man who rises and sleeps under the blanket of the very code that I provide
                      ..it's safer here.

                      Comment


                      • #12
                        hm, you could use a dlo but i dont think its necessary (probably might be better anyway tho?..meh), i make code with class variables all the time but i barely ever use dlo

                        only 1 more line of code anyhow

                        edit: just in case its of any use to anyone O_o ive edited the above code..heh

                        Code:
                        //=============================================================================
                        // Aothingyspawnar.
                        //=============================================================================
                        class Aothingyspawnar expands Triggers placeable;
                        
                        var()	float	RespawnTime;
                        var()	bool	bRespawn;
                        var() class<actor> spawnclass;
                        
                        function Trigger( Actor Other, Pawn EventInstigator )
                        {
                        local float stime;
                        
                        	stime = fmax(0.1,respawntime);
                        	setTimer(stime,bRespawn);
                        }
                        
                        	
                        function Timer()
                        {
                        	local actor Baz;
                        	Baz = spawn(spawnclass);
                        }
                        Last edited by UArchitect; 29th Jul 2005, 02:25 PM.

                        Comment


                        • #13
                          just replace that fmax with an fmin, dont want things staying in control now do we?
                          ..it's safer here.

                          Comment


                          • #14
                            its supposed to be an fmax
                            so that it wont accept a respawntime lower than 0.1 (avoid potential noob spammyness)

                            Comment


                            • #15

                              Comment

                              Working...
                              X