Area check - help needed

Mamu1234

Member
Hi Guys,

currently i´m trying to get in scripting a bit. Now a few questions came up and i would really appreciate if someone could give me a hand. (I´ve used the search-function but haven´t found a helping answer).

Problem / Situation :
I would like to create an "area" where something happens (e.g. fog came up, sound is played, whatever) as long as the player(s) is(are) within this area. When the player(s) is/are leaving the area the effect should fade/stopped/reverted (e.g. fog vanishes, sound stops).

My idea :
Creating an (maybe invisible) marker and checking if there is a player within the markers area. If this is true then the a script should be executed as long as the player is there.

Current development situation :
I have the "happening thing" working fine. But now, how do i create the loop for the player-check and do i need a seperate check if the player is still within "range" or has left the area?

Needed help :
Can anyone give me a rough code-sample how to create this check-loop based on the marker. Just to get into it and then i´ll do the rest.

Thanks a lot in advance
 
you can use a trigger, i have some on our server where if they go into a certain area a sound is triggered

Code:
class Sensors
    {
        items=147;
        class Item0
        {
            position[]={7795.5649,83.821281,9173.4346};
            activationBy="WEST";
            interruptable=1;
            age="UNKNOWN";
            text="Scream";
            class Effects
            {
                voice="scream";
            };
 
Back
Top