Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-16-2005, 03:03 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by Idrox0
how do you set a variable to a string? Namely, speed = #t(1);
If you're using the old scripting engine then you'll need to use setstring ('setstring nameofstring,newvalue;'). The new GScript makes things a little easier; the code that you gave would work.

Quote:
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?
Well, as a starter - and you may already know this - damage scripts are the kind of thing that should take place on the server. So if it's an immediate thing then you should send a trigger. If it's the result of a projectile then you can just receive the default notification. Stefan made a tutorial on this kind of thing that you might find useful: http://forums.graalonline.com/forums...ad.php?t=50809

In either case, you'll probably want to use the 'getnearestplayers' function to get a list of players near to the damage area and then iterate through them all to determine which should be affected. I've never used the function personally, but it's included in the tutorial I linked and it seems fairly simple.
__________________
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:06 PM.


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