Completing a quest by rescuing units

BlargIAmDead

New Member
Reaction score
25
If I wanted to make a quest where you have to rescue four specific rescuable units in order to complete it, how would I do that?

For instance, I've tried this trigger, where Player 12 is composed of rescuable units, with no luck:

Preaching Wrapup
Events
Unit - A unit owned by Player 12 (Brown) Changes owner
Conditions
Village Square 0014 <gen> Equal to (Ownership-changed unit)
Village Square 0015 <gen> Equal to (Ownership-changed unit)
Village Square 0016 <gen> Equal to (Ownership-changed unit)
Village Square 0017 <gen> Equal to (Ownership-changed unit)
Actions
Quest - Mark PreachingHisName as Completed
Quest - Display to (All players) the Quest Completed message: COMPLETED: Preachin...
Quest - Flash the quest dialog button
 
G

Goauld

Guest
Those conditions can't be true all at once, Ownership-changed unit can't be four units in one event. Make condition Or and move those under it and then make an integer variable with 0 value. Then make your trigger set var = var + 1 and then make if then else which checks if var = 4 then make your actions else nothing.
 
M

MoonRazer

Guest
why dont u simple use the event

Code:
Untitled Trigger 002
    Events
        Unit - A unit owned by Player 1 (Red) Is rescued
    Conditions
    Actions

u would need to do it for each player but it should work.
 

BlargIAmDead

New Member
Reaction score
25
MoonRazer: It's a single player campaign, with the objective being to rescue four specific buildings from a computer player. Your trigger would activate whenever the human player rescued any of the computer's buildings at all.

Goauld: So the trigger/s should actually look like this?

Rescue Villages
Events
Unit - A unit owned by Player 12 (Brown) Changes owner
Conditions
Or - Any (Conditions) are true
Conditions
Village Square 0014 <gen> Equal to (Ownership-changed unit)
Village Square 0015 <gen> Equal to (Ownership-changed unit)
Village Square 0017 <gen> Equal to (Ownership-changed unit)
Village Square 0016 <gen> Equal to (Ownership-changed unit)
Actions
Set RescuedVillages = (RescuedVillages + 1)
If (RescuedVillages Equal to 4) then do (Trigger - Run Preaching Wrapup <gen> (checking conditions)) else do (Do nothing)

Preaching Wrapup
Events
Conditions
Actions
Quest - Mark PreachingHisName as Completed
Quest - Display to (All players) the Quest Completed message: COMPLETED: Preachin...
Quest - Flash the quest dialog button
 
G

Goauld

Guest
Hmm, if you only run the another trigger in the first trigger and put that condition in the second trigger's conditions. At least it'll make things easier to be modified. Then it should be right what it needs to be.
 

BlargIAmDead

New Member
Reaction score
25
I've tried the trigger as outlined above, and tried it again with "Run Preaching Wrapup (ignoring conditions)". Neither works. I'm not quite sure what Goauld meant; can anyone clear this up?
 
P

pattern

Guest
Actions
Set RescuedVillages = (RescuedVillages + 1)
If (RescuedVillages Equal to 4) then do (Trigger - Run Preaching Wrapup <gen> (checking conditions)) else do (Do nothing)


Should be:

Actions
If (RescuedVillages lower then 4) then do (Set RescuedVillages = (RescuedVillages + 1)) else do (Trigger - Run Preaching Wrapup <gen> (checking conditions))
 

BlargIAmDead

New Member
Reaction score
25
Do I need events or conditions for Preaching Wrapup then, or should it run automatically (completing the quest)? Because I've replaced the actions in Rescue Villages with the action pattern suggested, and Preaching Wrapup still won't run.
 
G

Goauld

Guest
Preaching Wrapup doesn't need events if you run it through another trigger. Put in it's conditions RescuedVillages Equal to 4 and make Rescue Villages only do action Trigger - Run Preaching Wrapup <gen> (checking conditions)

Did you make the rescuable units rescuable with the action Unit - make rescuable or do you just change the owner of the unit? Because they are different events, unit changes owner and unit is rescued.
 

BlargIAmDead

New Member
Reaction score
25
I went into "Player Properties" and made all of Player 12's units rescuable, including the four "Village Squares". But if I use "a unit owned by Player X is rescued" in Rescue Villages, there is no "unit X equal to rescued unit" in the conditions; there's only "unit X is equal to ownership-changed unit".

However, I'm just about to test the trigger again with the "unit X equal to triggering unit" condition instead. I'll let you know how it goes.
 
G

Goauld

Guest
I always use the triggering unit because others tend to reset in waits. Triggering unit always refers to the "A unit".

There is by the way a better solution to this, make Rescue Villages' events to be Village Square 0014 <gen> is rescued, Village Square 0015 <gen> is rescued and so on and you can take off the conditions.
 
G

Giho

Guest
MoonRazer: why dont u simple use the event

Code:

Untitled Trigger 002 Events Unit - A unit owned by Player 1 (Red) Is rescued Conditions Actions



u would need to do it for each player but it should work.

BlargIAmDead: It's a single player campaign, with the objective being to rescue four specific buildings from a computer player. Your trigger would activate whenever the human player rescued any of the computer's buildings at all.

Hmm, BlargIAmDead I doesnt fully agree with u. Cant u use Moonrazers proposal?

something like this?
Code:
Preaching Wrapup
    Events
        Unit - A unit owned by Player 12 (Brown) Is rescued
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Triggering unit) Equal to Village Square 0014 <gen>
                (Triggering unit) Equal to Village Square 0015 <gen>
                (Triggering unit) Equal to Village Square 0016 <gen>
                (Triggering unit) Equal to Village Square 0017 <gen>
    Actions
        Set RescuedVillages = (RescuedVillages + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RescuedVillages Equal to 4
            Then - Actions
                Quest - Mark PreachingHisName as Completed
                Quest - Display to (All players) the Quest Completed message: COMPLETED: Preachin...
                Quest - Flash the quest dialog button
            Else - Actions
                Do nothing
 

BlargIAmDead

New Member
Reaction score
25
OK, I've got it now. The final trigger is almost exactly like Goauld and Giho suggested. Many thanks to them, and my apologies to MoonRazer for not reading closely enough.

This map is part of a (currently two-mission) single-player campaign. If any of you would like to test this campaign, please PM me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top