• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Converting integer to value

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,763
Hey i am making a quest and heres where im stuck at.

I have when u turn in one item of a quest it increases the value of the integer by 1 and when the integer reaches 3 you will receive quest rewards.

I have all of that except, I cant find the condition thats like

  • Integer - Value of (QuestRabbitHinds) Equal to 3
Can anyone help?
 
Well while not being 100% sure I know what you want, I can answer you overall question as yes there is such a function.

You can find it when you make a variable (the variable stores a value), but you can easily change it to be an integer it saves it as...

Try to look around in that area (its in the string + string part). I wish I had time to write the complete trigger for you, but I need sleep.

Anyway if you still can't find it, I'll do my best to get it shown tomorrow. Good luck




Btw: Post 2555 :grin:
 
I guess he wants a quest where you need to collect something and once you have 3 of them, the quest is done?

Well, you already said you increased an integer by 1 every time you deliver a quest item to the quest giver.
I don't really get the problem then :/
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • QuestRabbitHinds Equal to 3
      • Then - Actions
        • //Actions
      • Else - Actions
        • //Actions
(Condition can be found in Condition -> Integer comparison).
 
the problem is i need a GUI condition that checks if the value of this variable(QuestRabbitHinds) is 3
 
the problem is i need a GUI condition that checks if the value of this variable(QuestRabbitHinds) is 3
I guess he wants a quest where you need to collect something and once you have 3 of them, the quest is done?

Well, you already said you increased an integer by 1 every time you deliver a quest item to the quest giver.
I don't really get the problem then :/
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • QuestRabbitHinds Equal to 3
      • Then - Actions
        • //Actions
      • Else - Actions
        • //Actions
(Condition can be found in Condition -> Integer comparison).

Yes...
I think that the condition "QuestRabbitHinds Equal to 3" is exactly what you are looking for.
 
its there. just keep looking.

Your not helping.

And fail. i forgot that theres a Value section of a triggering thing right under options -.-

Now i got a new problem tho. I need to give the reward to every hero that helped -.-
 
Now I got a new problem though. I need to give the reward to every hero that helped :bored:


You could save every unit that damages the unit (for a time period to ensure that someone that hit it long ago also receives a reward) or you can pick every unit in an area around the killed unit and give the reward to all picked units.

Or you can make them add themselves to a party group before questing (if what your doing allows for that). Then it would just be a matter of adding reward to all members of the group.
 
Not what im looking for.

Lets say im using a unit array for a quest. Each unit that gives a rabbit limb is added to the array. Once there is 3, it gives the quest reward to every unit in the array.
 
Oh thats easy, you use a separate variable to count the total number of units in the array (also doubling as providing the next index to insert a unit into and the end point to stop looping when looping through the array.

You run your conditional check every time you add a unit to the array.

For example.
n is the counter
u is the unit array.

When adding a unit to the array.
u[n] = unit to add
n=n+1

the value of n will be 0 when no units are in the array, 1 when 1 unit is, 2 when 2 units are, etc.

You then check if n == 3 and if so you run your questi completion code.
Its that simple.
 
Status
Not open for further replies.
Back
Top