Announcement

Collapse
No announcement yet.

Adding Monsters and Warlords To A Assault Map

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

    Adding Monsters and Warlords To A Assault Map

    Ok, I have found one post that relates to my problem.

    http://www.ataricommunity.com/forums...hreadid=370319

    I have tried using the code and does not work. I can't place anything. However, I need a way to spawn monsters (preferably Warlords) in Assault. I have tried using a ScriptedSequence and a Warlord actor. But what ends up happening is that the Warlord will only spawn through a 'PlayerStart' actor. :bulb: I have tried tweaking the ScriptedSequence and Warlord actor in many different ways, but keep ending up with the same results of the Warlord spawning at PlayerStarts.

    What I need to happen is to be able to spawn monsters (or just warlords) in any location in my level. Kinda like how a vehicle factory works, but spawning monsters instead. I basically want to have the ability to control 'X' number of monsters spawned per spawn point. And once their dead, their dead (unless re-triggered; but doesn't need to be).

    Any help or ideas are highly appreciated! I really need this to put the frosting on the cake! Help me plz!

    P.S. This needs to work for an Assault map!

    #2
    You need the Invasion Everywere 2 mutator, it does exactly what you are looking for any gametype (AS included), and is fully customizable.

    Comment


      #3
      What a great mustator. However, is it possible to use something else? Where I don't have to add a server package to the ini file. I only say this because I want everything to be in myLevel and nothing extra on the side. Any ideas?

      Comment


        #4
        Just my two cents....

        1: Ask owner for permission.
        then
        2: decompile, and include all needed U code in map? (pretty sure theres a way just like including textures. Never tried though.)

        Comment


          #5
          Look from one of the Funmaps. I think it was Hellbender- or ScorpionRace. It has a warlord in it...
          Not sure, but I think supernewbie made them...

          Comment


            #6
            I have seen that map. It's one of those versions were they do spawn one Warlord. May not be a noob map since it is one of the few race track levels with a backgound lol. I will check it out. I will also try to decompile and put the invasion everywhere into my map. I was thinking about that today. I don't see a reason why it wouldn't work. I will try these tonight and see what happens. I have a fast comp to decompile/recompile code. I'll post as soon as I know what works.

            If anyone has any other suggestions/comments/answers, please feel free to add!

            Comment


              #7
              Ok....I have looked into decompiling the code for Invasion Everywere 2. However, I looked at the code and is not what I was looking for. But, thanks for the suggestions. What I should say is that I am looking for a placeable 'MonsterSpawner' actor which I can place anywhere in my level and monster types are choosen through the properties in UnrealEd just like a VehicleFactory. Monsters then can be spawned using a trigger.

              If you check out the final code in the tread I posted first, this is exactly what I need. Unfortunately, the tread was from a very long time ago and I cannot come in contact with those people. So, I want to revive this piece of code and make it work for UT2K4.

              I have tried using this code and imported it and compiled it accordingly and comes out fine in the actors as sub-classes of each other. However, they are not placeable for some reason. I actually have to uncheck the 'Placeable classes Only?' box to see the actors. Nothing happens when I try to place these in a level. I know how to import scripts and compile, but I am slightly unfamiliar with programming. I can read it and interpret what it means, but as far as actually programming goes....I need help with it. I am more of a graphic designer than a programmer. Maybe someone with some wicked talent can check out this code for me and give it a try in UnrealEd 3.0 (UT2K4). Maybe it needs to be modified in order to work properly.

              I have posted the final code from the old tread below:



              Code:
              **** Monster Spawning HOW TO **** 
              
              Compile in ued (into mylevel package) in this order: 
              -MyMonsterGameRules 
              -MyMonsterGameRulesSpawner 
              -MyMonsterSpawner 
              -MyMonsterSpawnerTrigger 
              
              When creating a new class make sure you select 
              the class that each class extens on (extends Actor or extends GameRules). 
              
              After compiling place 
              MyMonsterSpawnerTrigger and MyMonsterSpawner 
              in your map, rebuild all and save. 
              Set up actors save and have fun. 
              
              
              ///-THE CODE--///////////////////// 
              //============================================================================= 
              // MyMonsterGameRules. 
              //============================================================================= 
              class MyMonsterGameRules extends GameRules; 
              
              function ScoreKill(Controller Killer, Controller Killed) 
              { 
              if ( (Killer != None) && (Killed != None) && (! Killed.SameTeamAs(Killer)) ) 
              { 
              if ( killer.PlayerReplicationInfo != none 
              && MonsterController(Killed)!=none ) 
              
              { 
              Killer.PlayerReplicationInfo.Score -= 1; 
              } 
              } 
              
              if ( NextGameRules != None ) 
              NextGameRules.ScoreKill(Killer,Killed); 
              } 
              
              //============================================================================= 
              // MyMonsterGameRulesSpawner. 
              //============================================================================= 
              class MyMonsterGameRulesSpawner extends Actor; 
              
              function PostBeginPlay() 
              { 
              SetGameRules(); 
              } 
              
              function SetGameRules() //monster hack for DM-TMD 
              { 
              
              local GameRules G; 
              
              if (Invasion(Level.Game)!=none) 
              return; 
              
              G = spawn(class'MyMonsterGameRules'); 
              
              if ( Level.Game.GameRulesModifiers == None ) 
              { 
              Level.Game.GameRulesModifiers = G; 
              } 
              else 
              { 
              Level.Game.GameRulesModifiers.AddGameRules(G); 
              } 
              
              } 
              
              //============================================================================= 
              // MyMonsterSpawner. 
              //============================================================================= 
              class MyMonsterSpawner extends Actor 
              placeable; 
              
              //--internal 
              var int NrMonsters; 
              var bool bTimingSpawning; 
              
              //--mappers set this 
              var () class<Monster> MonsterClass; //what kind of monsters? 
              var () int NrMonstersPerInterval; //nr moster per interval 
              var () bool bIntervals; //true if you want to spawn monsters in intervals 
              var () float SpawnInterval; //interval in seconds that 1.0 or higher 
              
              function PostBeginPlay() 
              { 
              SetGameRules(); 
              
              if (SpawnInterval<1.0) 
              { 
              SpawnInterval=1.0; 
              } 
              
              if (MonsterClass ==none) 
              { 
              MonsterClass=class'SkaarjPupae'; 
              } 
              } 
              
              
              function SetGameRules() //monster hack for DM-TMD 
              { 
              
              local MyMonsterGameRulesSpawner MGR; 
              
              ForEach DynamicActors ( class'MyMonsterGameRulesSpawner', MGR) 
              { 
              if (MGR != none) 
              { 
              break; 
              } 
              } 
              
              if (MGR != none) 
              { 
              return; 
              } 
              
              MGR=spawn(class'MyMonsterGameRulesSpawner',,,Location); 
              
              } 
              
              function Trigger( actor Other, pawn EventInstigator ) 
              { 
              Instigator = EventInstigator; 
              
              if (bIntervals && !bTimingSpawning) 
              { 
              bTimingSpawning=true; 
              SetTimer(SpawnInterval, true); 
              } 
              
              else if (!bIntervals) 
              { 
              AddAMonster(); 
              NrMonsters=0; 
              } 
              
              } 
              
              function Timer() 
              { 
              
              AddAMonster(); 
              
              if (NrMonsters>=NrMonstersPerInterval || Level.Game.bGameEnded) 
              { 
              NrMonsters=0; 
              bTimingSpawning=false; 
              SetTimer(0.0, false); 
              } 
              
              
              } 
              
              function AddAMonster() 
              { 
              local Pawn NewMonster; 
              
              NewMonster=Spawn(MonsterClass,,,Location + (MonsterClass.Default.CollisionHeight - CollisionHeight) * vect(0.00,0.00,1.00),Rotation); 
              if ( NewMonster == None ) 
              { 
              NewMonster=Spawn(MonsterClass,,,Location + (class'SkaarjPupae'.Default.CollisionHeight - CollisionHeight) * vect(0.00,0.00,1.00),Rotation); 
              } 
              
              if ( NewMonster != None ) 
              { 
              NrMonsters++; 
              } 
              else 
              { 
              log ("ERROR: CAN'T spawn monster!"); 
              log ("ERROR: Possibly no space for a monster to spawn"); 
              } 
              } 
              
              
              //============================================================================= 
              // MyMonsterSpawner. 
              //============================================================================= 
              class MyMonsterSpawnerTrigger extends Trigger; 
              
              // Disable monsters from activating this trigger 
              function bool IsRelevant( actor Other ) 
              { 
              if ( Monster(Other)!=none ) 
              { 
              return false; 
              } 
              
              return Super.IsRelevant( Other ); 
              } 
              
              //--code end-//

              Comment


                #8
                Hmm I dont know much about triggers, but I think you can get away with something like a Vehicle Factory, but instead, you woul have to base it off of something else.

                Basically, I would make an actor that when you event happens, (this is where I don't know how to do it...), then spawn the monster you are lookin for.

                The trouble I would have is linking the trigger to the spawner. Perhaps check out some AS based things as they tend to deal with trigger related actors.

                Comment


                  #9
                  I actually made an actor just like that. I can't access the code right now but it was very simple. Every actor has an event called Triggered that get's called when that actor is triggered. In that you can spawn the monster of your choice. To link this actor to a trigger you have to set it up in the same way you do for a mover.

                  Comment


                    #10
                    hello

                    I used the SGO Monster spawner to spawn monsters in the map

                    you can get it in this thread :
                    http://www.ataricommunity.com/forums...&highlight=SGO

                    :noob:

                    Comment


                      #11
                      Originally posted by supernewbie
                      hello

                      I used the SGO Monster spawner to spawn monsters in the map

                      you can get it in this thread :
                      http://www.ataricommunity.com/forums...&highlight=SGO

                      :noob:
                      Super Awesome! All I had to do was import the myLevel.u file into the actor class, then I was able to place it in my level. I can choose any kind of monster!!! Also, I added a use trigger, and every time I hit it, a new monster will spawn at that spawning point everytime!!!! Exactly what I was looking for!!! I can easily create a scripted sequence now to only spawn 20 monsters. Thanks a lot for your help!!!

                      Comment


                        #12
                        Sweet! Everything is working great! One problem remains and I have not found an answer yet. The problem is, when the round ends.......any monsters that did not die will respawn at 'PlayerStarts' in the next round. I have tried looking everywhere for an answer. I found that a bDeleteMe command can be used to kill them (but I can't find it anywhere, i don't know how to use this). Or is there a simple command in a scriptedtrigger that will kill all monsters? Or is it possible to kill all monsters with a simple trigger (if a script was made to kill the monsters on a triggered command would be awesome, but i donno script)?

                        PLEASE HELP ME!!!!! My level is 99.9% done!!! All I need is this last piece to make it complete!!

                        Below is the thread to my beta version of my map. I have made lots of changes since this version. Like I said...all i need is this code....after that...i will credit all who helped me and finally release AS-PuzzleBox!!! I will post it in the thread below when complete as well as submit it to the Unreal map download sites for online multiplayer fun!!! I will also host a server for this level when released....so keep your eyes peeled if you want a GOOD puzzle-mind twister level. One small 2MB (zipped) file.

                        http://p208.ezboard.com/fagrfrm2.sho...opicID=4.topic

                        Comment


                          #13
                          Originally posted by Dead-X
                          I found that a bDeleteMe command can be used to kill them (but I can't find it anywhere, i don't know how to use this).
                          bDeleteMe isn't a command, it's a variable on the actor that if set to true means it will get deleted. But if you set it to true I think they get deleted right away (not when the round ends).

                          Unfortunately I'm your opposite -- I know scripting but next to nothing about mapping, so I'm not sure where this code would actually be included. But you would want to do:

                          Code:
                          Monster.bDeleteMe = true;
                          Is there anyway you can have a trigger that goes off when the round ends? Perhaps in the code for the last objective (since when that is triggered the round ends). In there you'd add this code:

                          Code:
                          local Monster m;
                          
                          foreach DynamicActors(class'Monster', m)
                          {
                              m.bDeleteMe = true;
                          }
                          If you have other code in there, make sure the local line is with all the other local lines (if there are no other lines just make sure it's the first line of the trigger function).

                          Comment


                            #14
                            If possible in the SGOspawner thing, set the spawned monsters a tag, something unique like monstarsss.

                            At the moment, you would have the event of the final objective the same as the tag of the AS_RoundEnd thingo. What you sould do is change the event of the last objective so that it doesnt trigger the end round, but rather triggers a script that does it:

                            Final Objective: event = endtag
                            AS_RoundEnd thing: tag = End

                            Scripted triggeractions:
                            [0] WaitForEvent: endtag
                            [1] Killall_Actors: Tag = monstarsss
                            [2] Triggerevent: End

                            If all goes to plan, that should kill the blighters!

                            Comment


                              #15
                              But what if the time limit is hit instead of the final objective? The monsters won't get killed and will still respawn.

                              Comment

                              Working...
                              X