Creating Quest-trouble

BruteBrutal

New Member
Reaction score
1
Hi fellow mapmakers...

New problem, my Quests for my ORPG...

At the moment it looks like this:

Old Wise Man
Events
Player - Player 1 (Red) Selects a unit
Player - Player 2 (Blue) Selects a unit
Player - Player 3 (Teal) Selects a unit
Conditions
(Triggering unit) Equal to Beardie the Wise 0016 <gen>
Actions
Quest - Create a Required quest titled Kill Emulen with the description Kill Emulen the evi..., using icon path ReplaceableTextures\CommandButtons\BTNSpinyCrab.blp
Quest - Display to (All players) the Quest Update message: NEW QUEST: Kill Emu...


QUESTIONS:

1) Is it possible to rightclick instead on the questgiver?
2) When i trigger the Quest it appear, but I only want to be able to pick ONE Quest, at the moment its possible to pick the same quest infinate times.
3) When I'm done killing the target in this case 'Emulen the Evil crab', can I make a rewardtrigger at the same unit somehow?


Thanks again,

/Brute
 

Sim

Forum Administrator
Staff member
Reaction score
534
1) Only if the player currently has a unit selected, and right-clicks on the quest giver.

You must then detect the order given, which is "smart", and start from there.

2) Turn off the trigger after it has run.

3) What do you want to do exactly? Yes it is possible.
 

BruteBrutal

New Member
Reaction score
1
1) Only if the player currently has a unit selected, and right-clicks on the quest giver.

You must then detect the order given, which is "smart", and start from there.

2) Turn off the trigger after it has run.

3) What do you want to do exactly? Yes it is possible.

Okay you have too high thought about me and for that I thank you :thup: but slow down a bit, started this mapcreations 2 days ago. :)

1) Now I only get the Quest by leftclicking on the unit that give the Quest, what do you mean with "smart"?

2) How do I turn of a trigger at a certain point?

3) When the boss is killed it says some textmessage like " good job, now return to Questgiver for your reward". I want the hero to go back to the Questgiver and make it possible for all 3 (making the demo-RPG now with 3 players) to walk up to Questgiver, rightclick on him and receive X reward. (I'm thinking XP sometimes, gold sometimes and item sometimes) but WHAT type of reward I figure is pretty simple once I have the right triggers.
 

Sim

Forum Administrator
Staff member
Reaction score
534
1) Should look like that.

Trigger:
  • Quest Receive
    • Events
      • Unit - A unit is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to smart
      • (Unit-type of (Target unit of issued order)) Equal to QUEST_GIVER
    • Actions
      • *Insert what happens when he receives the quest, just like you did with left-click.*


2) There's an action called "Trigger - Turn off (trigger)"

3) Detect it the same way I did in point 1) :p
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Okay you have too high thought about me and for that I thank you :thup: but slow down a bit, started this mapcreations 2 days ago. :)

1) Now I only get the Quest by leftclicking on the unit that give the Quest, what do you mean with "smart"?

2) How do I turn of a trigger at a certain point?

3) When the boss is killed it says some textmessage like " good job, now return to Questgiver for your reward". I want the hero to go back to the Questgiver and make it possible for all 3 (making the demo-RPG now with 3 players) to walk up to Questgiver, rightclick on him and receive X reward. (I'm thinking XP sometimes, gold sometimes and item sometimes) but WHAT type of reward I figure is pretty simple once I have the right triggers.
1). the problem is there is no "player has rightclicked something" event or a similar. but what we can detect is when a unit is issued an order. for example, player 1 has selected a footman, when he right clicks something now, a unit, the ground, a tree, whatever, the unit is issued an order. the order which is issued now is "smart" because all right click actions will result in the "smart" order.
what you can do is force the player to select some unit, for example his hero. and detect when his hero is issued a "smart" order (==player has rightclicked something) and then check if the (Target Unit of (Issued Order)) is equal to your quest unit.

2).
Trigger:
  • trigger - turn off (this trigger)

just put that at the end of your trigger.

3). have another trigger like the one you have right now. have it disabled at the initialization of the map. and when the boss unit you mentioned has been killed enable that trigger.
 

BruteBrutal

New Member
Reaction score
1
Wow, you two are 2 very beautiful human beings!


I'm VERY close now :D

Quest Reward
Events
Unit - Emulen the Evil Crab Emulen the Evil Crab 0015 <gen> Dies
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(smart))
(Unit-type of (Target unit of issued order)) Equal to Beardie the Wise
Actions
Hero - Add 10000 experience to (Picked unit), Show level-up graphics
Game - Display to (All players) the text: |cffffcc00MISSION ...


This is my temporary new created "reward-trigger", but I think I did something wrong because it triggers the same time as I get the Quest, I added Event" Unit X dies, and thought that would make it trigger WHEN the specific unit dies... but that was wrong.

Second of all I don't get the XP-gain from the Quest that I added. (reward)


Edit: Fixed reward, but still havnt figured out how to make it trigger first AFTER the unit is dead.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Unit - Emulen the Evil Crab Emulen the Evil Crab 0015 <gen> Dies

That should actually be in the Conditions. Remember, an event makes things FIRE! A condition is a requirement. In that case, I'm pretty sure that it's not the death of that pretty crab that gives you a reward, but visiting the quest giver again!

So, move it to conditions, using Boolean comparison and checking if the unit is dead as parameter.

> Wow, you two are 2 very beautiful human beings!

<_< np I guess! :p
 

BruteBrutal

New Member
Reaction score
1
This is fun! Thanks man, everything is working now, learned ALOT thanks to you, cheers! (but I'll probably come back in a short while too ;) )
 

BruteBrutal

New Member
Reaction score
1
Hmm... fast question, where can I change the MAX level that you can reach with your hero?

At the moment my heros CAP at level 10 :/ Not really great for an RPG :p
 

Sim

Forum Administrator
Staff member
Reaction score
534
Should be under Advanced - Gameplay constants. And then, Hero - Hero max level.

Something like that.
 

BruteBrutal

New Member
Reaction score
1
Trouble in Brute-land again!!!

Quest Reward
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Emulen the Evil Crab Emulen the Evil Crab 0015 <gen> is dead) Equal to True
(Issued order) Equal to (Order(smart))
Actions
Quest - Mark (Last created quest) as Completed
Hero - Add 10000 experience to (Triggering unit), Show level-up graphics
Game - Display to (All players) the text: |cffffcc00MISSION ...
Trigger - Turn off (This trigger)



The reward only trigger on the first one there... how do I get all to be able to claim the reward? (tried it out with a friend of mine)
 

Sim

Forum Administrator
Staff member
Reaction score
534
As it has been turned off, you need to turn it back on at some point or another.

Are the players being given the quest "together" or they have to do it separately? Show us your quest giving trigger.
 

BruteBrutal

New Member
Reaction score
1
Old Wise Man
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(smart))
(Unit-type of (Target unit of issued order)) Equal to Beardie the Wise
Actions
Quest - Create a Required quest titled Kill Emulen with the description Kill Emulen the evi..., using icon path ReplaceableTextures\CommandButtons\BTNSpinyCrab.blp
Quest - Display to (All players) the Quest Update message: |cffffcc00NEW QUES...
Trigger - Turn off (This trigger)


We do it together, one hero from the allied team take the quest, all receive the quest, when its done each and everyone should return it to the questgiver and for each one right-clicking on Questgiver their HERO should recieve the specific reward.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Create a boolean variable with an array of size 1, name it QuestCompleted.

Your quest completion trigger should become like that:

Trigger:
  • Quest Reward
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • QuestCompleted[Player number of (Owner of (Triggering unit))] Equal to False (==)
      • (Emulen the Evil Crab Emulen the Evil Crab 0015 &lt;gen&gt; is dead) Equal to True (==)
      • (Issued order) Equal to (Order(smart)) (==)
    • Actions
      • Quest - Mark (Last created quest) as Completed
      • Hero - Add 10000 experience to (Triggering unit), Show level-up graphics
      • Game - Display to (All players) the text: |cffffcc00MISSION ...
      • Set QuestCompleted[Player number of (Owner of (Triggering unit))] = True
 

BruteBrutal

New Member
Reaction score
1
Quest Reward
Events
Unit - A unit Is issued an order targeting an object
Conditions
QuestCompleted[(Player number of (Triggering player))] Equal to False
(Emulen the Evil Crab Emulen the Evil Crab 0015 <gen> is dead) Equal to True
(Issued order) Equal to (Order(smart))
Actions
Quest - Mark (Last created quest) as Completed
Hero - Add 10000 experience to (Triggering unit), Show level-up graphics
Game - Display to (All players) the text: |cffffcc00MISSION ...
Set QuestCompleted[(Player number of (Triggering player))] = True
Trigger - Turn off (This trigger)



It resulted in both got the XP-reward but JUST when the BOSS died, and NOT when talking to the Questgiver...
 

Sim

Forum Administrator
Staff member
Reaction score
534
Add a condition: (Unit-type of (Target unit of issued order)) Equal to Beardiethewise

or

(Target unit of issued order) Equal to Beardie-the-wise
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
also their are still 2 points which might glitch:

1). you might want to check the distance between the quest npc and the hero, right now the players can return the quest from everywhere on the map.
i suggest regions instead of using points for distance calculation since they will be alot less work.

and 2). you might want to check whether a player has currently selected the his hero when triggering the event. because it might be that he has summoned some unit and is right-clicking the quest npc with the summon selected. in this case the exp will vanish and you wouldnt get anything at all!
 

BruteBrutal

New Member
Reaction score
1
also their are still 2 points which might glitch:

1). you might want to check the distance between the quest npc and the hero, right now the players can return the quest from everywhere on the map.
i suggest regions instead of using points for distance calculation since they will be alot less work.

and 2). you might want to check whether a player has currently selected the his hero when triggering the event. because it might be that he has summoned some unit and is right-clicking the quest npc with the summon selected. in this case the exp will vanish and you wouldnt get anything at all!



Nice thank you, the conditionstrigger did the trick... however Accname has a point, didn't notice that until now, just ran up next to him, but as I can see now, its possible both to get the quest without having the hero marked, AND without being close.

So I'm guessing in I have to add a CONDITION in the both QUEST RECIEVING QUEST trigger and a CONDITION in the QUEST REWARD trigger.

Looked around but can't find any distance-related Conditions. sort of like "unit max range of trigger is 300 = true" or something like that. Am I way off?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
to get the distance between 2 units you first have to declare their positions as point variables, like this:
Trigger:
  • set Temp_Point_A = (Position of MYHERO)
    • set Temp_Point_B = (Position of QUESTNPC)


then you can use these points in a mathematical function which will return you a real:
Math - Distance between Point1 and Point2

the condition would look like this in the end:
Trigger:
  • If (Distance between Temp_Point_A and Temp_Point_B) Less then or Equal to 256

why 256? well, thats up to you, i have just choosen it because thats the exact size of 2 terrain tiles.

however, you can do it this way, but i wouldnt recommend it. its not just alot of work but its also a little bit uneffective.

i would say, create some region around that npc in the editor. and as a condition check whether that region contains the triggering unit. (the triggering unit is the unit to which the order has been given == your hero)


for your second question, i have to ask you first, does each player only has 1 hero in your game? if yes than it will be alot easier. you could just add the boolean condition:
((Triggering Unit) is a hero) Equal to True
but if you might get other heroes at the same time you would need to store the hero you want to be able to get the exp into a variable and check that. but i guess it isnt the case anyways so i ll just stop talking right now.
 
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