Can this trigger be simplified? (I don't think it can)

marvey323

Member
Reaction score
1
The problem is, it's still going to show up multiple times in the quest windows regardless of what you do right?

Issuing that action 'create quest' is making it for everyone !
 

marvey323

Member
Reaction score
1
Can you fix this up for me? I made the trigger as basic as possible:

Trigger:
  • Theodus Satyr Quest
    • Events
      • Unit - Theodus 0108 <gen> Is selected
    • Conditions
    • Actions
      • Set PositionofTheodus = (Position of Theodus 0108 <gen>)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of PositionofTheodus matching (((Owner of (Matching unit)) Not equal to Player 11 (Dark Green)) and (((Owner of (Matching unit)) Not equal to Neutral Hostile) and ((((Matching unit) is A Hero) Equal to True) and ((HasSatyrQuest[(Player nu and do (Actions)
        • Loop - Actions
          • Set MyPlayerGroup = (Player group((Owner of (Picked unit))))
          • Unit Group - Add (Picked unit) to KillSatyrs_PlayerGroup
          • Sound - Play QuestNew <gen>
          • Quest - Display to MyPlayerGroup the Quest Update message: New Quest Added: In...
          • Quest - Display to MyPlayerGroup the Quest Update message: Help us please! Th...
          • Set HasSatyrQuest[(Player number of (Owner of (Picked unit)))] = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • HasSatyrQuest[(Player number of (Owner of (Picked unit)))] Equal to True
                  • HasSatyrQuestStarted[(Player number of (Owner of (Picked unit)))] Equal to False
            • Then - Actions
              • Quest - Create a Optional quest titled Invasion of Satyrs with the description Satyrs have invaded..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
              • Set Quest1[(Player number of (Owner of (Picked unit)))] = (Last created quest)
              • Set HasSatyrQuestStarted[(Player number of (Owner of (Picked unit)))] = True
              • Trigger - Turn on Kill10 Satyrs <gen>
            • Else - Actions
      • Custom script: call RemoveLocation(udg_PositionofTheodus)
 

Redeamed

New Member
Reaction score
2
correct. The way I would do it is create the quest at the begining of the map and put in the description "talk to so-and-so" When the player goes to that person display a message to the triggering player whatever the quest is...it's not in the quest long this way but it works. make a variable idk ineger variable firstquest level at zero by default. the first time you talk to the quest giver have it set that variable to one and have the trigger for the quest completion have the condition that integer firstquest is equal to or greater then 1.
 

Redeamed

New Member
Reaction score
2
so long as you tell it to create a quest for each player it will create the quest for all players each time the action runs for a different player

...I've done some looking around before on this issue and never seen anyone say anything else.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
there is no way to get a quest active for only one player i believe and i've been working with quests for as long as ive been using the WE. As i dont have WE infront of me try seeing if theres a way to remove the quest from certain people .If so use the normal quest adding then remove from all except the player who clicked him. May work, may not.
 

marvey323

Member
Reaction score
1
Trigger:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Picked player) Not equal to (Triggering player)
        • Then - Actions
          • Quest - Destroy (Last created quest)
        • Else - Actions


Like this?
 

HydraRancher

Truth begins in lies
Reaction score
197
no I have a better Idea. Make a condition [BooleanVariable = false] then when your trigger activates do [Set BooleanVariable = true]
 

WindexIsBack

New Member
Reaction score
100
GUI - no.
JASS - yes. I'm not sure how but I know it's very possible to do. Likely dealing with local players (if p == GetLocalPlayer() then)

Untested though, so it might desync. But I'm positive it is possible somehow.
 

Redeamed

New Member
Reaction score
2
if you want to stick with GUI do what Hydra says. Boolean comparison variable and what not. I don't know about Jass but I certainly hope it is possible that would be great to do someday.

If you're not gonna look into the Jass idea you need to serious look and other alternatives.


and as a side note to everyone sorry about my earlier double post, im still touchy with using forums and editing not re post I will work on it.
 

eXirrah

New Member
Reaction score
51
There is no way to add quest to only 1 player or destroy quest for only 1 player. You just have to live with it. What you can do is that you write the description of the quest for all players and then just add a counter for the triggering player.
For example:
Player 1 selects the unit that gives him the quest
create a counter that will monitor how many satyrs Player 1 have to kill.
probably a small multiboard that has the name of Player 1 and 0/5 for example.

Then player 2 selects the unit that gives the quest.
player 1 already have killed 3 satyrs so when adding Player 2 to the multiboard.
the multiboard should display

Player 1 ... 3/5
Player 2 ... 0/5

or something like that, so it's like this ... all players have the description of the quest in Quests(F9), but all of them need to kill 5 satyrs which is shown on multiboard or leader board or something and the current kills is different for each player.
 

Sevion

The DIY Ninja
Reaction score
413
You can do it like it was done in Twilight's Eve ORPG. Create quests named like: <Quest Name> (<Player Name>)

For example: Satyre Extermination (Sevion)

And then create an instance of the variables for each player. For example:

Satyrs_Killed[1] For Player 1 and Satyrs_Killed[2] for Player 2 etc.

Then in the trigger, do:

E
Unit - Satyr killed blah
C
Player has Satyr Quest Blah
A
Set Satyrs_Killed[Player Number of (Triggering Player)] = +1
If Var > 15 then
Complete Quest Stuff


Sorry for the messy trigger.
 

eXirrah

New Member
Reaction score
51
GUI - no.
JASS - yes. I'm not sure how but I know it's very possible to do. Likely dealing with local players (if p == GetLocalPlayer() then)

Untested though, so it might desync. But I'm positive it is possible somehow.

I checked possibly all JASS functions that involve quest creating and non of them takes player as parameter. So it doesn't matter if the player is local or not ....
Off Topic:
idk why ppl think that if something is impossible to do in GUI it is possible in JASS. As far as I know JASS has the advantage of better handling local variables, better code density and some functions that GUI can't use(at least not in the form JASS can). All GUI code is converted to JASS eventually so GUI is JASS, but at lower level of structure.
 

marvey323

Member
Reaction score
1
So its not possible in Gui you say?

My entire map is coded in gui =/

If it has to be done in JASS is it possible to get a sample code that I can easily import into my map?
 

eXirrah

New Member
Reaction score
51
Yes it is.

if you have some functions that you want to use in more than 1 triggers then just add them to the header of the map. If you want to just add 1 trigger in JASS then you can add all the functions in that trigger.

EDIT: If you want to add quest to only 1 player via JASS. Post the problem at the JASS section and the ppl there that know JASS very well will help you.
By my opinion neither JASS or GUI can add quest to only 1 player, I believe it's hard coded when a quest is added then all players get the quest.
If you have seen in other maps that a quest is added only to 1 player than you might need to ask the creator how he did it.
 

marvey323

Member
Reaction score
1
Sorry I am totally not understanding what to do.

Whichever quest system method I choose to use, the following must be produced right?

Trigger:
  • Quest - Create a Optional quest titled Invasion of Satyrs with the description Satyrs have invaded..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp


Therefore, everyone is going to get the quest no matter what I do EXCEPT disregarding that action and never using it whatsoever. Unfortunately, I really want to show players their quests in F9 quest log but what you guys are saying is that I cant do that without showing it to everyone...
 

eXirrah

New Member
Reaction score
51
Well as I said in my last post. Ask at the JASS section if it is possible to add quest to only 1 player using JASS as WindexIsBack suggested.

By MY opinion(it's my opinion and probably not only, but ...) you can't add quest to 1 player only. I checked the JASS functions and none of them takes Player as parameter. This means that if the function doesn't take player as parameter it's not player dependent.
Here are the JASS functions for quest creating:

JASS:
native CreateQuest () returns quest

function CreateQuestBJ takes integer questType, string title, string description, string iconPath returns quest
    local boolean required   = (questType == bj_QUESTTYPE_REQ_DISCOVERED) or (questType == bj_QUESTTYPE_REQ_UNDISCOVERED)
    local boolean discovered = (questType == bj_QUESTTYPE_REQ_DISCOVERED) or (questType == bj_QUESTTYPE_OPT_DISCOVERED)

    set bj_lastCreatedQuest = CreateQuest()
    call QuestSetTitle(bj_lastCreatedQuest, title)
    call QuestSetDescription(bj_lastCreatedQuest, description)
    call QuestSetIconPath(bj_lastCreatedQuest, iconPath)
    call QuestSetRequired(bj_lastCreatedQuest, required)
    call QuestSetDiscovered(bj_lastCreatedQuest, discovered)
    call QuestSetCompleted(bj_lastCreatedQuest, false)
    return bj_lastCreatedQuest
endfunction


as you can see, none of these functions take as parameter Player whichplayer and this proves that these functions are not player dependent.

All you can do is ask at JASS section if there is some other function that can create quests and IS player dependent.

This is all I can help you with man ...
 

Azlier

Old World Ghost
Reaction score
461
Well, you could always create the quest for everyone at map initialization, without the quest text. Just have it be filled with something like 'Undiscovered Quest'. Then, later, you can fill it with text for just the local player. Yes, that requires JASS.
 

eXirrah

New Member
Reaction score
51
Well, you could always create the quest for everyone at map initialization, without the quest text. Just have it be filled with something like 'Undiscovered Quest'. Then, later, you can fill it with text for just the local player. Yes, that requires JASS.

Can you explain to me how? These are the JASS functions for editing quest and quest item text.
JASS:
native QuestSetDescription (quest whichQuest, string description) returns nothing
native QuestItemSetDescription (questitem whichQuestItem, string description) returns nothing
 

Azlier

Old World Ghost
Reaction score
461
Never touched questitems before. Never even heard of them. Anyway, you can do it like this.

Custom Script: if GetLocalPlayer() == Player([number]) then

Then, use the QuestSetDescription native to change the text.

Custom Script: endif

Done. I can't be bothered to open editor right now. Computer is too slow. Remember that in JASS, players start at 0. Red is Player 0, Blue is Player 1, etc.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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