• 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.

Ideas how to make my trigger work

Status
Not open for further replies.
Level 2
Joined
May 2, 2011
Messages
3
Hi to all hivemembers. Sorry for my english, its not my native language. I started to make a mini game in my map but the trigger is a little confusing. Thats how it goes: I have a unit that gives riddles(questions) to the player. If the answer of the player is correct, the hero progresses to the next level. If not, the player goes to the previous level. I set 10 riddles for example, and when the player clicks the riddle-giving unit, a random riddle will be given from these 10. So far, i figured it out somehow. But the problem is i want every riddle from these 10 to appear only once. Sorry for the long post.
 
I guess in GUI?^^

Make an boolean[array] variable which indicates for each question if it was solved or not.
If a question was answered correctly set boolean[RiddleIndex] = true.
When you randomoize a riddle check if the boolean[RandomIndex] Equals False. Else randomize again until found a matching one.

There are more ways of doing this, also more efficient ones... but this should be ok for you as GUI user.

Now, if you post in Trigger & Scripts forum, also post your code that is not working.
If you have a general question about how something should work post in WorldEditorHelpZone. :)
 
Level 2
Joined
May 2, 2011
Messages
3
Thank you man! I'll try it for sure. Thanks for helping me guys, i appreciate it.
 
Status
Not open for further replies.
Top