ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

Killing Guards

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

Killing Guards

Postby The0didactus » Sat Apr 18, 2020 4:47 pm

This is remarkably tricky, and given the time our comp's got, i may just have to stick with my slapdash solution.

Okay, problem is simple to explain: let's say you have rotating guard patrols. Let's say the player can kill guards in a huge variety of ways, such that they get a property, group assignment, location teleportation, whatever "DEAD"

HOW DO I MAKE THEM STAY DEAD?

I can move the character to a location called "dead"...but then they just keep moving through their walk, warping right back from "dead"

I can stop or suspend the walk with a task that checks EACH GUARD IN TURN, but even if I do that tedious work, they'll do one "step" of their walk before it stops (the game checks walks before everything else, it seems)

I can add them to a group called "dead" and then have the VERY FIRST TASK CALLED by one that warps everything "dead" to the location "dead" but even here I get weird screen clutter ("guard has entered")


So currently i"m doing all that and replacing the text "guard has entered" with basically "yep, that guard's still dead"
The0didactus
 
Posts: 293
Joined: Sun Mar 30, 2014 8:20 pm
Points: 150

Re: Killing Guards

Postby DazaKiwi » Sat Apr 18, 2020 9:13 pm

I would of thought a stop walk task trigger would of solved your problem but obviously not, i would like to have a go at this problem myself but i too am working on my game.

However another way to approach this is to have only two guards, one alive and one dead (possibly as an static object- when guard killed add players location to Dead Guards Loc Group- which that static object will appear in them all and of course hide the alive one until needed again) when player moves into a location roll for chance of a guard appearing or being there just a matter of changing a line 'A guard walks in','A guard is here'. And do away with the walk thing altogether. If you want more than 1 guard at a location at a time, just have character called 'Guards'.
User avatar
DazaKiwi
 
Posts: 755
Joined: Thu Oct 21, 2010 9:05 am
Location: New Zealand
Points: 61

Re: Killing Guards

Postby Denk » Sat Apr 18, 2020 10:20 pm

The0didactus wrote:Okay, problem is simple to explain: let's say you have rotating guard patrols. Let's say the player can kill guards in a huge variety of ways, such that they get a property, group assignment, location teleportation, whatever "DEAD"

HOW DO I MAKE THEM STAY DEAD?

I can move the character to a location called "dead"...but then they just keep moving through their walk, warping right back from "dead"

I can stop or suspend the walk with a task that checks EACH GUARD IN TURN, but even if I do that tedious work, they'll do one "step" of their walk before it stops (the game checks walks before everything else, it seems)

I can add them to a group called "dead" and then have the VERY FIRST TASK CALLED by one that warps everything "dead" to the location "dead" but even here I get weird screen clutter ("guard has entered")

I just made a quick demo (attached) and I did not have a problem with keeping the guards dead. I guess the problem is (please correct me if I am wrong), that when you kill a guard, you do not stop their walk immediately. Instead, you set a property or something else that you can check. Then you have a task that runs every turn and checks if a guard is dead. If he is, you move him to hidden (or somewhere else). Because you are waiting for the "every turn"-task to kick in, you get a delay of one turn.

In order to stop their walks immediately, you have to make sure that the task which stops the walk runs immediately. For instance, the killing task could be the task that stops the walk. That would work. But I understand from what you have written, that the guards can be killed in many ways. Thus it may be more practical if all killing tasks run several tasks called "Guard 1 dead", "guard 2 dead", "guard 3 dead" etc. Each of these checks if the relevant guard is dead. For instance, if guard 1 is NOT dead, the task "Guard 1 dead" will not be completed because it has the restriction that guard 1 is dead. Only if guard 1 is dead, will that task be completed. The walk of guard 1 is then set to stop if the task "Guard 1 dead" is completed. You may have many guards, e.g. 10 guards, but you can utilize that all the actions [Run task][Guard 1 dead], [Run task][Guard 2 dead],...[Run task][Guard 10 dead] can be selected together and copied. All you have to do then is to paste these 10 actions into each kill task. That should work.

I hope the above can be understood. If not, just ask.
Attachments
KillGuards.taf
(23.52 KiB) Downloaded 35 times
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
 
Posts: 538
Joined: Mon Feb 22, 2016 6:21 pm
Location: Hjørring, Denmark
Points: 251

Re: Killing Guards

Postby Lazzah » Sun Apr 19, 2020 10:34 am

One trick I use in my games is to put the 'End game in defeat' action into a system task (just the action, no restrictions) That way you can stop an event or walk by calling the 'Defeat' task rather than a whole load of different tasks where the PC gets killed.
The Axe of Kolt, The Spectre of Castle Coris, The Fortress of Fear, Die Feuerfaust, The Lost Children, Run, Bronwynn, Run, The Call of the Shaman, The Lost Labyrinth of Lazaitch, Magnetic Moon, Starship Quest, Revenge of the Space Pirates
User avatar
Lazzah
Moderator
 
Posts: 2390
Joined: Thu Mar 31, 2011 4:54 am
Location: Clacton-on-Sea, Essex
Points: 65

Re: Killing Guards

Postby The0didactus » Tue Apr 21, 2020 7:17 pm

So I want to post a follow-up here just in case anyone struggles with this in the future. Denk's method is ABSOLUTELY the right way to go. I'll say exactly what I did.

* For each character with a walk, I made a separate task called, say "Jacob Stops"
* the task had no effect and triggered whenever Jacob (or whoever) was in a location called "Graveyard" that was inaccessible to the player
* I made it so every walk "stop"ed when the "Jacob Stops" task for the associated character triggered.
* Whenever the player took an action that could kill a character (that is, move them to the graveward), I had the game run every stop task for every character (this is easier than it sounds, just copy-paste the list of effects)

This solution illustrates, once again, how critically important it is to work out your base mechanics early on in the design process. This solution works great if you have 5 potential ways to kill characters that are baked into the design process from the beginning. If you add a 6th way halfway through that's a bit different, it can gum everything up.


Now anyone that actually plays the game will notice there was some subterfuge on this thread: there are no guards in my game, rather victims, but the mechanics are still the same.
The0didactus
 
Posts: 293
Joined: Sun Mar 30, 2014 8:20 pm
Points: 150


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 13 guests