|
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Sat Sep 08, 2012 7:37 am Post subject: A speed bar?? |
|
|
I have an idea for a speed bar- a bar that will appear on the top left side
of the screen, that increases every second or so, when a button is held
down it will decrease and the player will dash (but when the bar is empty
the player cannot dash)
Any ideas of how to implement this? I'm assuming it will get deep into
plotscripting, timers, conditionals, etc, but I'm okay with all that _________________ #AlphaWolf#
http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.
##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios## |
|
Back to top |
|
|
Bob the Hamster OHRRPGCE Developer
Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Sep 08, 2012 1:21 pm Post subject: |
|
|
You can use the scripts from Escape the Wolf if you want. they do something very similar to what you are trying to do.
Making a button that lets you dash is pretty simple. There is an example script here: http://rpg.hamsterrepublic.com/ohrrpgce/Scripts:Dash
You just need to add a meter, and make the meter shrink when you are dashing, and disable dashing when the meter is empty.
Really this is just a global variable. Maybe you start it off at 50, and subtract 1 each time you take a step while dashing.
The meter is just a few slices that visually display the value of the variable.
I suggest you start off without a meter, and just use the "show value" command to display the variable. That way you can get the dashing part working correctly before you worry about the meter display.
For the meter, I would suggest two slices, one for the outside border of the meter. it's size and position never need to change. The second slice is a child of the first one, and it represents the colored part of the meter.
You can use "set timer" to make a meter display script update once every tick. The meter display script simply checks the global variable, and adjusts the size of the meter slice. |
|
Back to top |
|
|
alphawolf
Joined: 17 Aug 2012 Posts: 33 Location: South Carolina, America
|
Posted: Sat Sep 08, 2012 1:39 pm Post subject: |
|
|
Thanks a bunch
I will certianly get on that! And I already had the original dash script (but not being able to find an inbetween for speeds 5 and 10, I wanted to still give the player a challenge while dashing) _________________ #AlphaWolf#
http://societyofdreamers.webs.com/ <-- poetry forum, visit if you'd like, it's almost as dead as this forum (hehe) but it's just started.
##Contact at cckisby-SPAM@gmail.com#
#Remove the -SPAM above to prove you're# #not a spambot :/##
##AlphaWolf Studios## |
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|