
01-22-2005, 06:42 PM
|
|
Their black hands protect
|
 |
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
|
|
Quote:
|
Originally Posted by Kaimetsu
There is no "immediately". Scripts are processed in response to events. If the code is outside of an event block, it will be executed every time an event is triggered. So:
- Putting it in an event block makes the code clearer. It unequivocally states what the script is meant to do, instead of letting its execution depend on external factors. This means that:
- The code is futureproof - modifications to Graal's behaviour will not likely break it, and it conforms roughly to GS2's event model.
- Other scripters will know what you're doing, and be able to tell that you're not simply misunderstanding the nature of GScript.
- Assuming your NPC doesn't just do one thing and then destroy itself, you don't want its code to be executed randomly in response to external events. At best, it's just wasteful. At worst it's destructive.
|
Ahh, ok.  Thank you Kai.  |
__________________
|
|
|
|