Scripts / Randomly triggered events help

Author
Message
Johno 15
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 25th Aug 2014
Location: Cork, Ireland
Posted: 25th Jun 2015 20:47
Hi all, Was fooling around with DevCore35's Rain and snow boxes and I was wondering if it was possible to have them activate randomly during the game. The Logic being this: When the game starts the player possibly walks into a trigger zone which starts the random timer script. The rain box is placed on the map but not activated, Then at any random time the rain box activates and uses it's main script "rainbox_followplr.lua" to follow the player. Then at a second random time it deactivates.
Sounds like a lot of work but if anyone could think about it and let me know if its do-able that'd be great.

Thanks. John
www.archon-industries.moonfruit.com (Visit it)
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 25th Jun 2015 23:59 Edited at: 26th Jun 2015 00:07
Just paste this script over the other, save and run.

Fiddle with lo,hi (in init) to change the frequency/duration. 2000 lo and 5000 hi seemed to give the best "showery day" effect. After the rain event (or non event) the timer is randomised ready for next event. No zones or anything needed.

AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 26th Jun 2015 00:59 Edited at: 26th Jun 2015 01:01
Version 2 with sound added.


AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Johno 15
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 25th Aug 2014
Location: Cork, Ireland
Posted: 29th Jun 2015 20:39
Thanks so much !nullptr for the help. Greatly appreciated!
www.archon-industries.moonfruit.com (Visit it)

Login to post a reply

Server time is: 2024-05-09 03:07:23
Your offset time is: 2024-05-09 03:07:23