Notices

Go Back   FileFront Forums > The Games! > Warcraft Series > Warcraft III > WC3 Modding, Mapping and Editing

Remember Me?

WC3 Modding, Mapping and Editing
Want more info about a Mod? Making a Mod? Looking for Modders, Mappers, Skinners, etc.? This is your Spot!

Reply
 
LinkBack Thread Tools Display Modes
Old June 18th, 2005   #1
Certified Danger to Society
 
InnerGemini's Avatar
 
Join Date: October 23rd, 2004
Location: Wouldn't you like to know?
Status: Omnipotent, Omnipresent, & Omniscient
59 posts, 0 likes.
Rep Power: 0
InnerGemini is a n00b
Send a message via Yahoo to InnerGemini
Default Tutorial: How to Make a Simple Voting System

Hi all,

Someone emailed me asking if I would be so kind to show him how to set up a voting system for his map, so I figured I'd help him out and let everyone else know I'm alive at the same time.

In order to do this, you'll need several variables for the dialog and the counting. I'm only doing a two choice box, but any number of additional variables can be added. The variables I'll be using will be:
  • MyDialog- A "Dialog"-type variable.
  • Choice1- A "Dialog Button"-type variable.
  • Choice2- Another "Dialog Button"-type variable.
  • Choice1Counter- An "Integer"-type variable.
  • Choice2Counter- Another "Integer"-type variable.
There are three main parts to setting this up:
  1. Dialog box and button setup
  2. Voting counting
  3. Voting Ending & End Tally
So to start with the dialog box... **VERY IMPORTANT** Your dialog setup trigger cannot have "Map Initialization" for its event, because Warcraft 3 will not run your dialog like that. It's better to set it up with a delay, anywhere from .01 seconds to 2-3 (as shown):


Next, the buttons must be first created and then made to equal a variable value, like so:


Now that your dialog is set up, you want to keep track when a person clicks an option, and hide the dialog after they vote so they can't vote again. This example will be for the first choice only, but all that needs done is to change 'Choice1' and 'Choice1Counter' to 'Choice2' and 'Choice2Counter':


This step is open for you to interpret and change to your personal situation, but there should be a point where voting ends. It would be simple to create a timer on the screen that shows when voting ends, but I'm sticking to the basics. I'm ending this one after 30 seconds:


Finally, the good part, the results of your vote. After you tell the game to close everyone's voting dialog, you give the game an 'If/Then/Else' action for each voting option, where if it has more votes then the others, something happens. For mine, I made it play one sound for the first choice and a different sound for the second. (**I realized that I could have combined this trigger with the last one and it would have been less clutterwork, but I already had the pic taken and uploaded, so use your imaginations**):


Ok, there you have it. I'm not saying this will fit every situation, or that this is a great example of how to do it, but it's the best I'm willing to do, considering I've never put one in any maps I've made. I hope this will help any mapmakers along their path should they need this.

As always, Peace Out!



InnerGemini is offline   Reply With Quote
Old June 18th, 2005   #2
The Wise Mushroom
Recruit
 
Zamamee's Avatar
 
Join Date: September 18th, 2004
Location: In your head.
Status: Forum Explosives Specialist.
93 posts, 0 likes.
Rep Power: 0
Zamamee is a n00b
Default Re: Tutorial: How to Make a Simple Voting System

Wow. This is excellent, Job very well done.
Zamamee is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial -- how to make a simple custom armour Mando SW:KOTOR2 Modding, Mapping and Editing 1 December 18th, 2006 01:30 PM
US voting system flawed? Mast3rofPuppets The Pub 44 October 29th, 2004 06:18 AM
Floridas new voting system J-Dub' General Yib-Yab (Off Topic) 29 October 24th, 2004 03:27 PM


All times are GMT -7.







   
 





This site is part of the Defy Media Gaming network

The best serving of video game culture, since 2001. Whether you're looking for news, reviews, walkthroughs, or the biggest collection of PC gaming files on the planet, Game Front has you covered. We also make no illusions about gaming: it's supposed to be fun. Browse gaming galleries, humor lists, and honest, short-form reporting. Game on!

FileFront Forums - Terms of Service - Top
Theme Selection
Copyright © 2002-2016 Game Front. All rights reserved. Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Forum Theme by Danny King (FileTrekker), Sheepeep & Graeme(rs)
RSS Feed Widget by FeedWind