Scripts / key collection zone

Author
Message
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 20th Apr 2016 15:28
Here are 2 scripts that will allow the player to NOT collect keys, or if the script is edited, other entities to be collected through walls.

Unzip the _lua_zone folder into your scriptbank folder, and the map into your mapbank folder.

On the testmap if you run around the outside of the walls, you cant get the keys that are on the tables inside next to the walls, with the pickup key script original you could pick up through walls. The trick is to setup a zone INSIDE your room or building and if the player enters it set a variable which the key_get_zone.lua checks to see if it is 1, if so then allows pick up of key, if 0 (Outside of zone) then no pick up.

plrinzone_collector.lua assign to zone.
key_get_zone.lua assign to you key or object. Dynamic.

Simple but very useful. Well I hope so anyway.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.

Attachments

Login to view attachments
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 20th Apr 2016 16:47
cool thanks..
PC Specs:

Q9550@3,8GHZ - 8GB RAM - SVGA R9 280 3GB GDDR5 - HDD WD 1500TB
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 23rd Apr 2016 08:47
Just discovered that the key collection only script only work on 1 zone, if you add same script to another zone it messes up.

Below are the newer versions, as before:

plrinzone_collector.lua assign to zone.
key_get_zone.lua assign to you key or object. Dynamic.

The scripts number are important plrinzone0 and key_get_zone0 must be the same area, and so on up to the 15 i've made for you. If you need more just go into the scripts change the init, main and any instances of the variable insidez to the same number: eg:

if the key_get16_zone_init(e)

then the variable should be changed insidez16

same goes for the other script, hope thats all clear...... all working good here now

Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-12-22 17:35:58
Your offset time is: 2024-12-22 17:35:58