Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-16-2005, 01:16 AM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
Question 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
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.