Download

creating a sequence of game play elements for a mission

hi, I’m relatively experienced enough with blueprints to figure out the parts of my level, but not how to abstract them to let other designers easily click and drag a mission together. To be clear, i’m not talking about the cut scene sequencer.

In a level, i want an NPC that leads you through an area, a target shooting tutorial task to start once you get there, a cutscene to play, the npc to lead you to another area etc etc. I know how to create each of these situations individually, but what i want is to be able to sequence these, so that one task waits to be activated until the previous one is done. The logic for being done would be unique to each type of situation, but reusable for other situations. For example, “Wait for NPC and Player to arrive at location” would be a task i want to use multiple times, the internal logic for it is very simple.

In Unity i could make a base class, call it a “Task”, with a function to Start() and a function to check IsComplete(). For a task like waiting for npc to arrive, start would trigger the npc behaviour and IsComplete would just measure the distance between the goal and the NPC. Simple code, which i could then extend with subclasses for other kinds of tasks. To manage it, you’d just need to put these tasks in an array with some manager class that waits at each task until IsComplete() returns true, then activating the next task with Start(). In Unity, i could make these scriptableobjects and put them in an inspector, so a designer could simply click and drag level actors into the right slots, and order these tasks to script out the whole mission.

tl;dr: I know how to code individual tasks that can happen in my mission, but i want a generic and resuable way to trigger and sequence these tasks that another designer could easily click and drag together, without some gigantic spaghetti code of gates.

It sounds like you are looking for a simple version of a Quest system. If so, there are many good YouTube tutorials on how to put together a Quest system.