I want a slider to make it so that the more to the left you put it, the more likely your attacks will hit, the more to the right you put it, the stronger the attack.
How would I do this?
ID:159351
Mar 27 2009, 2:33 am
|
|
After using winget() to get the value of the slider (most likely you only want to do this after it changes, and other times just keep track of its last known value), you'll have a value of 0 to 100 to work with. The real question then is how you interpret it.
Say a value of 50 means you have the normal chance to attack, and hit with normal strength. Maybe 100 could mean you hit with four times as much force, but your chance to hit is a lot less than what it was before. Let's say that slider=100 means you have 25% of your regular hit chance; if so, it makes sense that slider=0 means you'd have only 25% of the chance not to hit. if(slider >= 50) This puts a lot of strategy into fighting, as it means if you have a really low hit chance on someone like say 10%, you can choose the minimum attack to raise that to a respectable 77.5%. If you have a high hit chance, you can sacrifice some of it to make a bigger hit. Lummox JR |
In response to Lummox JR
|
|
winget(usr,"ad bar","Err...?") I'm stuck. =\ |
In response to Howey
|
|
I think you're looking for the "value" parameter :\
winget(src,"window.control","value") |
In response to Howey
|
|
Did you know there's a skin reference?
Can be located in Dream Maker in the Help menu. |
In response to Kaiochao
|
|
Cheers, I was just missing the value part. Also, Cheers Kaiochao. Never noticed that.
|
The value can be obtained via winget().