Fog and darkness level in scripting & some other questions
Posted: Sat Jul 21, 2012 8:37 pm
Hello (again... well--- sorta) 
1. I'm trying make a script that will be able to tell how far can the Player (& other actors-- even better!) see. I guess some levels of fog and darkness limit the player's sight, and wondered if there's a way to get the levels of fog and darkness in a current room... and also know what does this level mean at all. I mean, if fog density is 10, what is the (max) radius the player can see?
Same goes with darkness levels.
Is there a way to know if there's any source of light around the player or npc, and its radius?
Also:
2. I want to run a script that will run when the player uses a special cursed weapon. I suppose "on activate" won't work here (er, right?) and "pchitme" has to have a target... I'm using "onpcequip", but I'd rather the script to run when the player actually waves the weapon. Is there such a thing?
3. Is there any way to check whether the PC is followed/has summoned a creature, and to refer later on the script to the potential follower? (I'm just trying to see how to deal with companions, at some points of the game...)
Note that I don't have the Tribunal or Bloodmoon expensions...
I apologize if my questions are too noob-ish, (since I'm pretty noob-ish)... did a lot of reading and searching, but can't recall any solution to these...
Any help with either of the questions above will be highly appriciated!
Thank you,
Rose.
1. I'm trying make a script that will be able to tell how far can the Player (& other actors-- even better!) see. I guess some levels of fog and darkness limit the player's sight, and wondered if there's a way to get the levels of fog and darkness in a current room... and also know what does this level mean at all. I mean, if fog density is 10, what is the (max) radius the player can see?
Same goes with darkness levels.
Is there a way to know if there's any source of light around the player or npc, and its radius?
Also:
2. I want to run a script that will run when the player uses a special cursed weapon. I suppose "on activate" won't work here (er, right?) and "pchitme" has to have a target... I'm using "onpcequip", but I'd rather the script to run when the player actually waves the weapon. Is there such a thing?
3. Is there any way to check whether the PC is followed/has summoned a creature, and to refer later on the script to the potential follower? (I'm just trying to see how to deal with companions, at some points of the game...)
Note that I don't have the Tribunal or Bloodmoon expensions...
I apologize if my questions are too noob-ish, (since I'm pretty noob-ish)... did a lot of reading and searching, but can't recall any solution to these...
Any help with either of the questions above will be highly appriciated!
Thank you,
Rose.