Problem creating a Quest

Sakuralein

New Member
Reaction score
0
Hello~
I tried and tried and tried, but I cant find the answer >_>'

I made a quest that requires the hero to get 3 shimmerweeds.
After the hero picks up 1 shimmerweed a message show ups saying "2 more shimmerweeds remaining" and also updates the quest requirements and blabla...
To this point everything works perfectly fine.

But when the hero is supposed to pick up the 2nd one and then later the 3rd one, I just cant get it to work... either the quest is done instantly after picking up only 1 shimmerweed, or nothing happens at all... I tried to use integer variables, various different condition set ups, nothing worked.

Please could someone give me a hand here ^^'
 

Sakuralein

New Member
Reaction score
0
There are no more triggers for that, since I couldnt get it to work.

The only trigger that is left is the quest giver, which is just a normal NPC giving the quest.
And then the first trigger for the 1st shimmerweed pickup.

Event : Unit aqcuires an Item

Condition : Unit is controller by player 1
Item manipulated is
Shimmerweed 1 or Shimmerweed 2 or Shimmerweed 3

Action : Quest update + message you have 1 shimmerweed, only 2 to go.
Trigger : turn this trigger off.



I tried to add a variable after that so that when u get 1 shimmerweed the variable changes from 0 to 1 and the next trigger event wouldnt start unless the variable is equal to 1.
But it started every time anyway.

Then I even played around a bit with the conditions for a new trigger that should activate once u already have 1 shimmerweed. That looked kinda like this

Event : bla
Conditions : bla, bla
AND conditions
Shimmerweed 1 and 2
OR Shimmerweed 2 and 3
OR Shimmerweed 3 and 1

But as I said, nothing worked ^^'
 

Sakuralein

New Member
Reaction score
0
I figured its pretty simple, Im just unable to see it.
But since its kinda specific, I wasnt able to google it ~_~

So could you just tell me how to do it so the Triggers and/or variables understand that I already picked up 1 shimmerweed, later 2 shimmerweeds and in the end 3 shimmerweeds ? ^^'
 

xAnaMorphine

Active Member
Reaction score
43
Use an Integer Variable.
In your Map Initialization Trigger you assign 0 to the Variable:
Trigger:
  • Set Shimmerweed = 0

Then for if the Unit Acquires an Item:
Trigger:
  • Set Shimmerweed = Shimmerweed + 1


For the rest use an If-Then-Else-Function which should do the job.
 

Sakuralein

New Member
Reaction score
0
I did that, but the problem was that after he got 1 shimmerweed the other 2 triggers activated themselves automatically. Even tho each trigger had their own line of "Set Shimmerweed = Shimmerweed + 1" and an according condition to that in the next trigger.
 

maxou

You can change this now in User CP.
Reaction score
15
You can do something like that:


Event:
An unit acquire an item

Conditions:
ItemType of Manipulated Item = Shimmerweed
QuestIsCompleted = False

Actions:
Set Integer = 0
For each Integer A from 1 to 6
| If Item Type of Item carried in slot Integer A= Shimmerweed
| Then Set Integer = Integer + 1
| Else -
Set Integer = Integer*-1 + 3 (See above)
If Integer = 0
Then Display to player(owner of Hero manipulating item) "You have completed the quest!"
Else Display to player(owner of Hero manipulating item) "Integer" + " Shimmerweed left to complete the quest"


Set Integer = Integer*-1 + 3
It's because you need to have 3 Shimmerweed, with this line, you convert 0 in 3, 1 in 2, 2 in 1, and 3 in 0, so, from the number you have, you get the number you need ;)
 

Sakuralein

New Member
Reaction score
0
that line is not possible :

| If Item Type of item carried by Hero manipulating item = Shimmerweed

the option closes to this is :

| If Item Type of item carried by Hero manipulating item IN SLOT ONE = Shimmerweed

which kinda confuses me, since u cant exactly pick up shimmerweed so its in ur inventory, therefor it wont be in any slot ^^'
 

maxou

You can change this now in User CP.
Reaction score
15
Yea nah you can do somthing like ItemType of Manipulated Item = Shimmerweed, sorry my bad^^
 

Sakuralein

New Member
Reaction score
0
ahh nice, then I only have 1 question ... I dont understand what you were trying to explain to me here ^^'

Set Integer = Integer*-1 + 3
It's because you need to have 3 Shimmerweed, with this line, you convert 0 in 3, 1 in 2, 2 in 1, and 3 in 0, so, from the number you have, you get the number you need ;)

0 in 3
1 in 2
2 ind 1
3 in 0

what you have is what you need...

im sorry that doesnt make any sense to me o.o
 

maxou

You can change this now in User CP.
Reaction score
15
Well by doing Integer*-1+3 if Integer = 1, you have 1 Shimmerweed in your inventory, then the formula does : 1*-1+3 = -1+3 = 2, you still need 2 Shimmerweed.
If you have 2 Shimmerweed in your inventory, it will be : 2*-1+3=-2+3 = 1, you still need 1 Shimmerweed, and if you have 3 Shimmerweed in your inventory, will be : 3*-1+3 = -3+3 = 0, so you can say you completed the quest!
 

Sakuralein

New Member
Reaction score
0
ah lol... yeah now I get it... I just couldnt follow ur thoughtprocess...
thank you very much, I will try that again now ^^
 

Sakuralein

New Member
Reaction score
0
Okay I guess I have to be more accurate this time.
shimmerweed1, shimmerweed2 and shimmerweed3 are items created on the map by acquiring the quest from another trigger.

Code:
Create Shimmerweed at center of AREA
Set Shimmerweed1 = last created item
 
Create Shimmerweed at center of AREA
Set Shimmerweed2 = last created item
 
Create Shimmerweed at center of AREA
Set Shimmerweed3 = last created item

Shimmerweed is an integer variable that was set up by acquiring the quest from another trigger.

Code:
Set shimmerweed = 0

Then the first trigger for this quest is this one

Code:
Events :
  Unit - A unit Acquires an item
 
Conditions :
  Or - any (conditions) are true
    Conditions
      (Item being manipulated) Equal to Shimmerweed 1
      (Item being manipulated) Equal to Shimmerweed 2
      (Item being manipulated) Equal to Shimmerweed 3
 
Actions
  Set Shimmerweed = 1
  Quest - Display to (All players) Quest Update message : You found a magical herb, 2 more to go !
  Trigger - Turn off (this trigger)

Then the second trigger for this quest is this one

Code:
Events :
  Unit - A unit Acquires an item
 
Conditions :
  Or - any (conditions) are true
    Conditions
      (Item being manipulated) Equal to Shimmerweed 1
      (Item being manipulated) Equal to Shimmerweed 2
      (Item being manipulated) Equal to Shimmerweed 3
Shimmerweed Equal to = 1
 
Actions
  Set Shimmerweed = 2
  Quest - Display to (All players) Quest Update message : You found a magical herb, 1 more to go !
  Trigger - Turn off (this trigger)

The third trigger is build exactly the same. I used the OR condition since the 3 shimmerweeds are spawned at different locations and its the players chocie which one he finds and picks up.

The way I build this quest however results in all triggers to be activated after each other with only picking up 1 single shimmerweed.

I know the mistake must be so minor that Im just too stupid to see it.
So please, someone, open my eyes ^^'

PS : You are allowed to laugh, I realize that the problem is super simple... Im just to stupid to see it ^^'
 

maxou

You can change this now in User CP.
Reaction score
15
I don't know man, my trigger was okay, did you put the Set Integer = Integer*-1+3 in the Integer A loop? o.o
 

maxou

You can change this now in User CP.
Reaction score
15
Set Integer = (Integer x -1) + 3
This, Integer is an Integer variable, you can call it Shimmerweed_Integer, or whatever you want, and then use the "set variable" line
 
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