Home Tutorials Forums Articles Blogs Movies Library Employment Press

 ActionScript.org Forums [AS2] Dice game help
 User Name Remember Me? Password
 Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

 Thread Tools Rate Thread Display Modes
 09-03-2008, 06:57 AM #1 tommygruber Registered User   Join Date: Sep 2008 Posts: 3 [AS2] Dice game help Hello, I'm programming this dice game that's similar to yahtzee. It has 6 dice and I'm trying to figure out how to assign Points to the dice and certain rolls. for example, if the 6 dice show 1,2,3,4,5,6; Then that would be a certain amount of points. Any feedback on this would be awesome. Thank you, Tommy www.gmediaservices.com
 09-03-2008, 09:18 AM #2 drumn4life0789 Registered User   Join Date: Feb 2007 Posts: 160 first you need to know how they will roll. Like are they really rolling and whatever is facking up is what is called or is it like click this button and watch these 6 numbers change then they stop. But eaither way you would have to create an array wich will check and add up the data and so on.
 09-03-2008, 01:19 PM #3 syruplord Registered User   Join Date: Jul 2008 Posts: 32 if all else fails, if(a and b and c...){points = x;}
 09-03-2008, 06:26 PM #4 tommygruber Registered User   Join Date: Sep 2008 Posts: 3 Dice Help! Hey, Thank you for the advice. The only problem is my game doesn't add up the dice, the points are based off of what numbers show up. 1's are worth 100 5's are worth 50 3 of a kind = face value ( 3 Five's is 500 points) 4 of a kind = face value (4 two's is 2000 points) I have a dice roller button and when you click on it it calls my rollDice function. I have my 6 dice in an Array called aDice. I'm also tracing the array to make sure the same numbers that are on the dice table are the same in the output panel. So I guess my question is how to let flash know that when certain combinations of numbers appear, They have a set value. Thank you again for your input,
 09-03-2008, 08:26 PM #5 rrh throw a trace() in there   Join Date: Dec 2006 Posts: 1,982 Oh man. That's "You Blew It!" I was totally playing with this a couple weeks ago. it went something like this: ActionScript Code: ```plug all the values into diceArray sort diceArray  if diceArray matches 12345 or 23456 {   score is 1000 } else {  countArray=[0,0,0,0,0,0,0]  for each entry in diceArray,          increment the corresponding entry in countArray  if any entry in countArray is 3 or more, then {    three of a kind  } else {    score is countArray[1]*100+countArray[5]*50  } }```
 09-03-2008, 09:51 PM #6 tommygruber Registered User   Join Date: Sep 2008 Posts: 3 Wow! Thankyou...

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home ActionScript Forums Group     ActionScript 3.0     ActionScript 2.0     ActionScript 1.0 (and below)     Simple Stuff (Newbies) Flash General Questions     Flash 10 General Questions     Flash 9 General Questions     Flash 8 General Questions     Other Flash General Questions Flex     Flex 2, 3 & 4     Flex 1 Extensions and Plugins     Components     JSFL - Extending Flash Desktop, Mobile and non-browser Environments     AIR (Apollo)     FlashLite / Portable Devices Development     Projectors and CDs Supporting Technologies     HTML and JavaScript     haXe     Server-Side Scripting     Flash Remoting     Flash Media Server General     Best Practices     Gaming and Game Development     Animation and Effects     Flashants Support Forum Community Boards     General Chat     Just for Kicks Challenges     Detention Flash In Action     Site Check     Cool Sites     Widgets Decommissioned     Projects and Positions CMS Forums     Announcements Board     Content Postings / Updates     Product Review Requests     CMS Technical Questions     Process Questions     Collaboration & Suggested Articles

 Similar Threads Thread Thread Starter Forum Replies Last Post ultraman Gaming and Game Development 0 08-05-2008 06:35 PM AdamSchroeder General Chat 0 12-18-2007 09:16 PM metal chao Gaming and Game Development 4 11-22-2006 06:20 PM krolben Gaming and Game Development 4 07-28-2004 12:41 PM MiniMurderdoll Gaming and Game Development 0 06-01-2004 10:27 AM

All times are GMT. The time now is 11:55 AM.

///

## Categories

 Contact Us - Home Page - Archive - Privacy Statement - Top

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.