Scripts / light switch problems

Author
Message
Disturbing 13
3D Media Maker
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 22nd Apr 2018 07:45
I have the light switch with a light working fine, but the light is already on. Is there already a script I'm not seeing for the light to start off. This is necessary because multiple things will spawn when a switch is pulled. I just need the actual light to be off before I pull the switch. Any help would be great.
Thanks,
D13
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Apr 2018 08:51
Do this in the lightswitch script:
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
Disturbing 13
3D Media Maker
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 22nd Apr 2018 09:38
Not sure if I did it the way I was supposed to but I tacked it on at the top of a copy of the lightswich script. I just stayed and started on and didn't turn off or on. maybe my implementation is wrong?
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Apr 2018 11:00
If you not tell what you use. I always try to guess what you use and then will look at the stock scripts:
there is a lightswitch.lua

this in connection with a light source you can switch the light source on and off.

If you use an entity which should activate the light source then this will not work and of course I canĀ“t help you because you do not give me any details.....
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd Apr 2018 11:22 Edited at: 22nd Apr 2018 11:34
After looking in the scriptbank I throw something together which helps you(sry not much time today)
It is tested:
use for your switch the switchmain.lua in the scriptbank folder and for your dynamic light source the attached script.
Then name your light with a specific name and write it in the ifused field of the switch.

I setup a test level with stock entities, look at it after you add the light2.lua in your scriptbank folder

Hope it works for you
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download

Attachments

Login to view attachments
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 22nd Apr 2018 11:30
or place a zone over your player marker assign it a script to switch off or on any lights in your map, using entity number.

HideLight(46) etc etc
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Roland D05 Synth Module, Bluedio Victory V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
Disturbing 13
3D Media Maker
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 22nd Apr 2018 18:54
Thanks Corno_1, That is exactly what I was looking for. Works perfectly. It's a wonder that it wasn't already included in the base scripts.
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 23rd Apr 2018 09:30
I htought there was a default light switch script. I'm sure i remember Lee saying he had added one a while back.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Corno_1
GameGuru Tool Maker
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 23rd Apr 2018 21:35
Quote: "I htought there was a default light switch script. I'm sure i remember Lee saying he had added one a while back."

He added one but the only one I found is lightswitch.lua and there the player interacts with the light source and not with a switch. So either Lee failed the task or it is lost.
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM

Login to post a reply

Server time is: 2024-12-22 19:15:01
Your offset time is: 2024-12-22 19:15:01