Ok, my question is:
What is the best way to slow down attack speed?
Obviously, you can put a spawn and slow them down for X number of ticks. But, in my game I want people to train their speed up and with this format I would have to choose a "top speed" and subtract their speed from the top speed. (ex. top speed is 10 and player speed is 9, so wait is 1... or top speed is 10 and player speed is 1, so wait is 9)
This works, but I do not want to limit the top speed that someone can reach as it is a very important part of combat in the game. If two people have all even stats except one guy is faster by 2, then the guy that moves faster is going to win the fight. Obviously that is not always true as the slower guy can be witty and come up with a well thought out battle plan, but you get what I am asking.
EDIT
I just thought of another way, but again it requires a max speed. Using the prob(P) proc, and instead doing a dodge or hit type of combat. Any more idea's would be great guys!
ID:151544
May 21 2010, 7:14 am (Edited on May 21 2010, 7:31 am)
|
|
May 21 2010, 7:58 am
|
|
You can use expressions in sleep/spawn like sleep(10*0.2) or spawn(10/attackspeed)
|
In response to Leur
|
|
yes, but again that's setting the "top speed." I think at this point I'm just going to have to set the top speed at 10 and figure something out later down the road.
|
In response to JoEn00b
|
|
well, make "top speed" a variable on the mob, and when they get faster, add +1 to that speed. you might also want to go with a lower bound speed, like, for example, if your top speed rises, your "slow" speed of 1 will have to wait more than ten ticks now. So, you could, per se, have a "speed modifier" variable, which adds or multiplies both the top speed and the current speed. Also, want to make it a bit more interesting add a speed+=rand(-1,1) just to make your speed matter, but adding a bit of chance in to it as well.
If you want to also add a "luck" variable, or something similar, that can modify the randomness, very lucky adds between 0 and 3 while unlucky or lower numbers would make you slower by adding a negative number. It all depends really, it's as customizable as you want to make it just... A: Make sure your math is right B: Don't try to limit yourself. |
I removed the need for sleep() or spawn() entirely with my formatting.
mob I've never asked for input on this format, but has been reliable as long as I've been using it. Prevents accidental lock-ups where the player can't attack. |
In response to Cthulh
|
|
All good things must come to an end, that includes Attack Speeds. I would set up a max Attack Speed Level. the delay starts out crappy like 20 and every level the attack speed decreases until the only delay in how fast you can attack is how fast you can hit the button. That's just my opinion. Now if you want a game based more on skill than levels, just set a delay that never changes for any players. Look at MW2, every gun has a set damage and rate of fire, so it relies on your skill as a player to be the best. Not just have a higher level.
-That's all for me :D- |
In response to JoEn00b
|
|
Well In my game i hve something like that but for my recovery. simply just have something like..
var/Atkrate = (100 - AttackRate) then use sleep(Atkrate) in the same proc. That means with an attackrate of 1 they would be able to attack every 9.9 seconds but if they train it high enough they could attack every tick. It would also not be very hard for you to set the lowest and highest limits of attack rate so it doesnt go out of proportion. |