I want to start this thread for only one reason, and that is to say thank you.
Thanks to all the modelers and programmers and anyone else who has given me free models or free scripts or free advice or just an inspiring thought.
So i want to say thank you by giving away any scripts that i have that can maybe help other users.
i know exactly how it feels if you have an idea that feels brilliant but you do not have the models or the scripts to go with it.
so any free script that can help to make a project / game better is always welcome.
hopefully some people will be able to use some of the scripts that i will post here.
i am a slow learner so don't expect to see a lot of scripts coming in. but as soon as i have some scripts that can be of use i will post it here.
no fancy scripts at this time , but plain ones that can do useful stuff.
Please bear in mind i am a newbie here , i am no programmer, my programming skills are at a level of learn as you play.
So for all the programmers out there when i make mistakes , and i will , feel free to correct me, or if you just want to make the scrip better also feel free to do that and also if you want , post the modified script here again to help anyone who wants to use it.
Ok so i have this 3 scripts to determent if a player is inside or out side off a building.
i know there is scripts out there that also cover this but this is my take on it.
the difference of my script is i use g_time in the zone scripts to get like a time stamp the see when the player goes in or out of a zone.
this helps so the player can not move in and out between the zones and try to confuse the game .
2. outside_zone. lua
This picture also explain were you have to place the zones if you have a building with more than one entrance.
i know you can just use one big zone in the test map were you have a flat normal surface,
but as soon as you have a complex building or a building with elevated levels it helps to place the zones at the in and out side of each door.
you can use as many zone's as you like depending on how many doors the building have.
i also have attached the test map so that you can test the scripts. just put the scripts in the script bank and re select them , because i run them out of my own folder.
i hope this can help someone.
Please correct me if i have done any mistakes.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11