Scripts / New light switch Script

Author
Message
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 27th Aug 2015 14:35 Edited at: 27th Aug 2015 14:36
This script is a simple lightswitch script, it can be used to switch on and off lights in the same script, or instead of HideLight() ShowLight() you could use spawn to, for example Spawn and Hide entities, like a plank used for a bridge, could be up or down etc.

Both switch states use PlaySound(e,1) but you could change one state to PlaySound(e,0) for a different switch sound for off or on.

The player can only use the switch when facing it.

I have also used the timer to slow the switch on/off times as the script was so fast. Simple but it works



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: 27th Aug 2015 15:27
good work Tarkus...very useful
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: 27th Aug 2015 15:39
thanks JC
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.
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 27th Aug 2015 23:34
nice work Tarkus,
very usefull

thanks

Harry
Harry
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 28th Aug 2015 14:27
Nice one dude, and so useful too.

Thanks for share.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 28th Aug 2015 15:40
cool thanks glad it is useful
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.

http://contest.gamedevfort.com/submission/185#.Vd9sJflVhBd
AceRimmer
Reviewed GameGuru on Steam
9
Years of Service
User Offline
Joined: 28th Feb 2015
Playing: classic British heavy metal mostly
Posted: 28th Aug 2015 21:18
ta! appreciated

Login to post a reply

Server time is: 2024-05-06 20:42:09
Your offset time is: 2024-05-06 20:42:09