• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 29
Joined
Oct 24, 2012
Messages
6,543
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