Scripts / 3 switch mission

Author
Message
soundstudios
13
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 23rd Sep 2022 14:26 Edited at: 23rd Sep 2022 14:27
Hi There Does anyone know how I can have say three radio towers with a light that is off and with there own switch for each tower to turn the light on and have it as a mission. Once all radio towers have been switch on that is that mission complete. Do I use a script to do this or is there another way to do this. I was wondering if this is possible.

THKS
PM
EyeFly
3
Years of Service
User Offline
Joined: 8th Nov 2021
Location: Oregon, United States
Posted: 23rd Sep 2022 18:37 Edited at: 24th Sep 2022 11:11
I tried to get it working. But I can't get it right now. I'll try again this evening.

UPDATE: I got it working!
Keep Making Stuff You Enjoy.

Attachments

Login to view attachments
EyeFly
3
Years of Service
User Offline
Joined: 8th Nov 2021
Location: Oregon, United States
Posted: 24th Sep 2022 11:11 Edited at: 25th Sep 2022 11:48
OK I got it working now. Let me know if you find any bugs.

It's a switch script that I added the core functionality of the collection_count script to. The switch you add this script to will act like a normal switch and an objective object. It should work with the original collection_count script too (although I have not tested that). You can toggle the prompt to be shown or not. Just set the number of objectives you want and then activate that many switches (or activate switches and gather other objectives). Each switch (and other objects with the collection_count script) need to have their objectives set to the same numbers. The switch will only activate once so the player can't complete all objectives on the same switch. It will work as an objective if you have it turn On or turn Off. Either way is fine. You can set the objectives higher than 6 too.

I hope it works for your needs.

Keep Making Stuff You Enjoy.

Attachments

Login to view attachments
soundstudios
13
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 24th Sep 2022 13:24
Hi EyeFly It works wonderful

I would say one thing. Make sure you don't have any other collectable items like a golden goblet set to the collectable count script as it clashes with collection count switch script. It would be great if it didn't clash.

Many Thanks for your help on this one

Soundstudios
PM
EyeFly
3
Years of Service
User Offline
Joined: 8th Nov 2021
Location: Oregon, United States
Posted: 24th Sep 2022 18:34 Edited at: 24th Sep 2022 18:34
I just tested the collection count switch script with the collection count script and they worked fine for me. Just make sure you add the totals together. So if you have 3 switches that need activated and 1 golden goblet that needs collected, you need to set the objective number to 4 in both scripts (3 switches + 1 golden goblet = 4 objectives. If you have one set to 3 and one set to 1, The one set to 1 will activate first. And it doesn't matter if you activate a switch, it will still activate the collection count with only 1 objective. Even if the script with only 1 objective is on the goblet. Both scripts are adding to the same global value.
Keep Making Stuff You Enjoy.
EyeFly
3
Years of Service
User Offline
Joined: 8th Nov 2021
Location: Oregon, United States
Posted: 25th Sep 2022 11:45 Edited at: 25th Sep 2022 11:48
I fixed the issue with the collection_count script at the same time. The prompt only shows when you get close to the switch now. just like how the collection_count is written.

Here's a link to it.
[FREE] Collection Count Switch - Script/Behavior

Keep Making Stuff You Enjoy.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-21 12:00:20
Your offset time is: 2024-11-21 12:00:20