xisto Community

Flash Actionscript 2 Help Need help on actionscript to make a flash game. any pros out there?

Recommended Posts

Hi All,

So I'm doing this Flash game and gosh it's so hard and confusing for me now.

I've never done a game before and it's driving me crazy.

This is what it looks like:

You will be familiar with it if you have played word dojo.

So I'm trying to make this. and I've used

newCoin = attachMovie("lettercoin", "lc"+coins, coins)

newCoin.gotoAndStop(random(26)+1) <------ so this is what I've written to randomize the coins from a - z

However, I want it to randomize it so that I get more vowels in it, less constants, especially the letters Z and X, etc.

What should I add to that to be able to do that?

Thanks

Share on other sites

I'm no action script programmer, or flash game maker, but i have had a little experience with javascript and C++ non-visual programing. Would it be possible to create two different types of coins, one for vowels, and one for constants and assign the vowels to randomize more than just 5 letters. I know im not a pro, all i have is a basic understanding, and very baasic at that. but i just thought i'd try to put my two cents in. heh

Share on other sites

Hi!I do not really know much about the game you are building and I haven't played Dojo, but if you're looking for a way to make a type of block (alphabet, circle, or whatever you call it) more frequent than the others, you can use a different algorithm. Here's what I'd suggest:var x = random(3); //I'm assuming this returns 0, 1 and 2var y;if (x < 2) { y = random(5); //vowels; 0=a, 1=e, 2=i, 3=o, 4=u} else { y = random(21); //the remaining letters}Now, if you look at the first statement, there's an equal probability of x returning a 0, 1 or 2. However, since we're performing the same action for x=0 and x=1, we have twice the probability of returning a vowel.Let me know if you'd like me to tweak the algorithm. Perhaps you can send across the Flash (.FLA) file and I could modify it for you?Regards,Nitin Reddy

Share on other sites

thanks for all the reply but i worked it out.but now i need help on making the "Scroll" on the left hand side to start playing its animation once i press the Play button. If anyone knows and can help but needs the file please shoot me an email. I will definitely send it over :PThanks so much!

Share on other sites

I've got my scroll and all my letters to work. it can now be selected but how on earth do I make multiple levels and how do i make it so that each word is a certain amount of points. anyone know?even if you know a tutorial I wouldn't mind. it would be great help to me.

Share on other sites

but now i need help on making the "Scroll" on the left hand side to start playing its animation once i press the Play button.

Hi!

I can't seem to figure out what you mean by scroll, because from the screenshot you've posted before, everything fits onto one screen.

In either case, you can achieve the 'scrolling' effect by doing something like "object._x = object._x - 1" which in shorthand is represented as "object._x -= 1"

Regards,
Nitin

Share on other sites

I've got my scroll and all my letters to work. it can now be selected but how on earth do I make multiple levels and how do i make it so that each word is a certain amount of points. anyone know?

Hi!

You can assign points to each letter (Scrabble-style!) by creating an array of 26 elements (A-Z), assigning a score to each letter. Then, in your scoring function, instead of simply adding 1, add the value you retrieve from the array.

You can also implement a simpler scoring algorithm by performing a simple IF-ELSE check. If the letter is a vowel (see my earlier post in this thread), add 1 point else add 2 points. You can add more conditions to scoring if you have a few types of letters (vowels, 'ZXQ', other alphabets).

You can create levels by reducing the number of vowels available to the player (see my earlier post in this thread). You can start with a larger number of vowels and then move to fewer vowels and more uncommon letters ('ZXQ'). Alternatively, if your game-play is timer based, you can reduce the time allotted to the player for making a more.

If you can, try to play a demo version (free trial) of BookWorm. It looks quite similar to what you are building though I can't tell for sure as you haven't provided much detail about how your game works.

Regards,
Nitin

PS: When I played Scrabble, it wasn't a registered trademark. Now, I guess I have to say Scrabbled or Scrabbler to keep the corporations from suing me for using their trademark illegally :-P

Create an account

Register a new account