Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Dice Rolling Event System (Replay purposes)

hi all,

Would like to know if anyone can help me with a Dice Rolling Event. Example:

1) I reached a junction in a map, an event pops up, if I roll 1 - 3, it means I decided to turn west (left) and if I roll 4 - 6, it means I decided to turn east (right).
2) I bump into a creature on the map, an event pops up, if I roll 1 - 4, it means I decided to fight, if I roll 5 - 6, it means I decided to run, but this will trigger a damage (- 2 hp) to me because I run from battle.

Is it easier to do the above with event or scripting?

I hope someone here can help me. ^_^ By the way, can anyone create a 3D dice to show the event happening on-screen?

Thank you very much.

Regards,
Joseph (zen1979)
 
Well, it's pretty easy to do with events. Set a variable to a random number from 1 to 6 - there, you've rolled your die.
Then, all you've got to do is in a show text, say something like
"You rolled /v[n]!" where n is the number of your variable. Then use conditional branches to seperate the different tasks.
 
thank you to both of you: gratheo and Brewmeister ^_^

I'll try it right away and let everyone know of the result ^_^

Regards,
Joseph (zen1979)

Edit: Managed to complete the event together with the dice rolling animation, however, is it possible to have a transparent background? so that I can only see the dice, rather than a dice on a coloured background?

Edit2: Done, although not too smooth, now it has the same background as the tileset ^_^

So, I will be using Dice Rolling Event in all the games that I'm going to make ^_^

By the way, how to I get permission to create a game based on a book from the author? It says in the book that content of the book should not be copied or recreate without the consent of the author. :(

Additional Question:
1) Let say if I were to use this Dice Rolling Event System for the whole game, it means I have to recreate this event as a common event? and if its a common event, how do I keep track of certain variables or let say whether i've come across a particular creature, is it possible that i roll 2 dices and combine the total?

2) I also need help in creating a spotlight for my character, so that even as a player, i'm not able to see the whole dungeon. can someone help me? if it can be done with event, its better ^_^ (coz i'm not good in scripting)
 
Well, I'm not sure too sure on the book part, but I'm pretty sure you're allowed to create fangames for books or movies.

As for the dice rolling system, you can create a common event that rolls it with the animation and sets the variables. Then in a map event, say you want a split in the road, you can put in it: Call Common Event (roll dice), then use conditional branches to check the variable if it equals a number, and move your player left or right.

And your spotlight system, you can use the show picture command, make a black picture that's the size of the screen and have the center transparent and slowly fade out to black. Then show it in-game and you're done :)
 
Copyright: Technically, you can't use the title of the book, or copy the content directly. The chances of legal action to make you 'cease & desist' are slim to none if you don't sell it. But, it's still unethical. (your call)
Now, if you wan't to make a sequel to the book, and use the character names, that's legit.

Regimos' spotlight method is the easiest solution. However, your "picture" will remain stationary to the window, not the character. If you've noticed, when the character gets near the edge of a map, he no longer stays in the center of the window. To prevent him from walking out of the spotlight, create a 'buffer' zone of 11 tiles on the left & right, and 8 tiles top & bottom that the character can't walk on.

Be Well
 
Or you could show a 640x480 full black picture and use the light effect as a smaller picture above the black. You should set a couple variables to Hero's Screen X and Screen Y, respectively, and show the picture at those coordinates, from the center. You'll never leave the light that way, no need to make bigger maps.
 
Hevendor's method will work with a parallel event on the map.

However, a full black picture with a light effect above it will only show the light effect on black. You won't see the character.  You'll still need to use same picture as above, with a 'transparent' hole in the center.

Something like this....
http://home.comcast.net/~bridge161/spotlight.png

Ooops, if you're going to move the picture with the character, you need to double the size so it still covers the whole screen when it's centered on the edge.

Be Well
 
wow, replies seems to be technical, I'll try my best then ^_^

First, recreate the system as a common event.

second, create a spotlight.

I'll try my best, thank you for helping me.

Regards,
Joseph (zen1979)

edit: managed to create the common event for my Dice Rolling, however I've failed to do the spotlight thing, need some tutorial.

edit2: Thanks Regimos for posting the tutorial, I'll try it when I reach home ^_^

Thanks in advance.

Regards,
Joseph (zen1979)

edit3: Thank you Regimos once again, I managed to do it :D
 
Oh, there's also Angelman's Flashlight Tutorial. Follow the instructions in the tutorial. Then, use the "Change Screen Color Tone" and make the screen darker. When you turn on the flashlight, you should be able to see better around you. Play with the Size/Magnify values (add to the %, like 300%, 400%) and the x/y coordinates to adjust the light.
 
Is that dice character-set still around? I was wondering how one o fhtem would work, like to show it rolling. I mean how could you make it random. I guess there is a way but I;m not really sure...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top