No announcement yet.

Map events depending on difficulty?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Map events depending on difficulty?

    I have the idea of a map that behaves different on different game difficulties.

    For example: More hints or even more stuff to find and pick up on EASY difficulty. On the other hand, more obstacles and dangers on HARD or INSANE.

    What would I have to do to have a map event fire at a certain difficulty (and only then)?

    Does anybody know?

  • #2
    Custom coding I fear. Pretty neat idea though. The var you want to have your thingies check for is AoGameInfo.MissionDifficulty (a value between 0 and 3 I think, 0 being easy). I suggest a subclass of pickup that auto destroys itself in beginplay if the required value is not met, and a custom script class for the scripted trigger for little extra surprises on higher difficulties.


    • #3
      Thanks Don.

      The self destroying actor seems like a way to do it. Not only additional pickups, also objective-specifying hints or even arrows showing the way. (Much like those in UT Assault maps, but only appearing in Easy mode, giving that mode a 'simulation' taste. )

      And additional dangers for HARD games can be done likewise I think. Pawns or Spawners that destroy themselves if not on Hard or Insane.

      But If I think about it in that terms, I would need a bunch of customized actors that way.

      Maybe I was hoping for some general thing rather, like a condition for a scripted trigger or something, that could then act depending on game diff.

      Or like only ONE custom actor, that would need to be like a dispatcher, triggering one of three difficulty-altering events at game start (or in PreBeginPlay?). The events for Easy, Heasy and Insane.

      If that makes sense. It seems to get more complicated the more I think about it.

      But about the coding, I will need to read and try a lot. Seems I once again poked into something I don't know enough about yet...


      • #4
        Well, if you want to reduce coding to an absolute minimum (even though I think it would just complicate things even more), just create a subclass of the TriggeredCondition, maybe call it DifficultyCondition, that sets itself True/False depending on the game difficulty on map startup. You can then point IfConditions in ScriptedTriggers at it and have the scripts handle the rest, like destroying or spawning actors.


        • #5
          For additional equptment you could just attach all the equipt for each difficulty to a mover, then you only have to have 4 equpitment triggers related to the difficulty.
          Alien Swarm Map List


          • #6
            Yes. And that's just asking for the stuff being buggy online.


            • #7
              Sofos coded two custom actors to achieve this.

              - a DiffDispatcher, subclass of the AoDispatcher, but this one dispatches according to game difficulty. Works fine. Can be used to easily make difficulty-specific events.

              In combination with a trigger covering the playerstarts, and some movers, it could change the map layout too. (for a strange unknown reason it doesn't work to just tag the DiffDispatcher to the playerstarts)

              - and a DiffObject, spawning something (a pickup, or a mesh, or whatever) on map start, if a certain difficulty has been chosen.

              Again, a strange issue appeared. It works alright to mylevel these two custom actors. But it seems you can't spawn other custom mylevel actors with it. Which would be needed if any of the actors to spawn should have values changed from the defaults.
              The log says 'mylevel package cannot be found', which is clearly not true, otherwise the diffObject wouldn't work at all if myleveled...

              We would be very grateful if somebody was able to shed some light onto this. I didn't find anything about that strange behaviour of the mylevel package, not on the UWiki, not by googling all the web.



              • #8
                And just to describe the problem: It appears that DynamicLoadObject fails to load anything from the myLevel package. If you subclass the normal aliens and put the code in myLevel package you cannot spawn them with the standard AoAlienSpawner (that uses the same method to convert the AlienString, in that case myLevel.xxxx, to a class). I've asked in the beyond Unreal forum, but haven't got any answer yet.
                Anyway if you want to look at the code (and maybe even find a better way to achieve that, as these are actually my first fully working classes ) or even test these new actors to see how they can change completely a map PM Lightfoot or me. Or you can wait for the first map that uses them
                Antikythera mechanism