
03-16-2005, 01:16 AM
|
|
Registered User
|
Join Date: Oct 2003
Posts: 66
|
|
Small question
|
Okay, I'm doing a huge revamp on Graal and combining it with an RPG. I believe it would be sort of like Graal Kingdoms, as it has stats and things... anywho, the movement speed of the player is derived from a 'Speed' stat using the following formula:
spd = 0.5 + ((Speed - 20)/100)
A quick note if anyone cares: the max Speed you can have is 100.
spd is how many tiles a character moves every 0.05 seconds. Using this and a bunch of code from premade NPCs using a lot of vecx and vecy and all that other crap, I completely recreated the movement system of Graal (yes, I know I did it the hard way, but it allows for more flexibility, I suppose). Now, all that is well and good, but I have two questions.
1) Because this project isn't even CLOSE to being finished, I have made a prototype level that allows you to change your speed by typing 'setspeed #'. Now, all this is fine and dandy, and perhaps it's been a bit too long since I last scripted, but how do you set a variable to a string? Namely, speed = #t(1);.
2) This is not going to be needed for a while, but how would I be able to script a weapon that hits multiple areas that are close together, but does not hurt the target multiple times? This idea came from a sword scenario: in reality, a person does not have to be directly in front of you to be hit; they could be at the very beginning or end of the swing (to the near left or right) and still be hit, and so you see my need for multiple areas of damage dealing.
Whew, that took a while... ideas and answers welcome.
Ciao |
__________________
|
|
|
|