# Rpg coding question(in relation with stats)

**URL:** <https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358>\
**Category:** Uncategorized\
**Created:** [April 20, 2006, 6:35pm UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358 "2006-04-20T18:35:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpgfanatic](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rpgfanatic](https://forum.kirupa.com/u/rpgfanatic)\
**Post date:** [April 20, 2006, 6:35pm UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358/1 "2006-04-20T18:35:59Z")

</div>

like the title said,  
i would like to give my characters speed stats but iam wondering if it is possible in ac to actually have the character benefit from the stat during battle(less wait time) if so would there be a way to connect that to a wait bar that loads up with a speed based on that stat?

---

<div class="post-metadata">

**Author:** ![DangerousDan](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DangerousDan](https://forum.kirupa.com/u/DangerousDan)\
**Post date:** [April 20, 2006, 11:14pm UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358/2 "2006-04-20T23:14:23Z")

</div>

Yeah there is a way, hold on while I see if I can get an example working while I mess around with my own little game.

---

<div class="post-metadata">

**Author:** ![DangerousDan](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DangerousDan](https://forum.kirupa.com/u/DangerousDan)\
**Post date:** [April 20, 2006, 11:39pm UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358/3 "2006-04-20T23:39:21Z")

</div>

Here, it gives a random speed 1-10 and then moves the wait bar based on the speed. I may have done this a hard way but that is just because I’m still learning actionscript.  
Someone can delete my previous post.

---

<div class="post-metadata">

**Author:** ![rpgfanatic](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rpgfanatic](https://forum.kirupa.com/u/rpgfanatic)\
**Post date:** [April 21, 2006, 4:37am UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358/4 "2006-04-21T04:37:53Z")

</div>

> [@DangerousDan](#):
>
> Here, it gives a random speed 1-10 and then moves the wait bar based on the speed. I may have done this a hard way but that is just because I’m still learning actionscript.  
> Someone can delete my previous post.

a code’s a code so i can’t missout on that,although i can probably mess around with the speed by using instead of random, speedstat trough different calculations,  
and thanks for helping me 🙂

---

<div class="post-metadata">

**Author:** ![DangerousDan](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DangerousDan](https://forum.kirupa.com/u/DangerousDan)\
**Post date:** [April 21, 2006, 4:57pm UTC](https://forum.kirupa.com/t/rpg-coding-question-in-relation-with-stats/186358/5 "2006-04-21T16:57:28Z")

</div>

Yeah it should be easy enough to mess around with that. Just change the value of speed.
