Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: Kingslayer Kyle
Hey guys,
Just wondering if somebody could help me,
I have JBirds easter egg song script,
I would like to edit this script though to be able to have multiple triggers for different songs,
If possible would somebody be able to edit this so that I have a few placeholders for different song names and triggers to activate them?
Thanks,
Kyle.
EDIT: Also if possible, make it so that the songs can't play at the same time.. Thanks :D
ModmeBot:
Reply By: Adrih
Tell your script to run multiple songs
ModmeBot:
Reply By: Abnormal202
I actually spent a while making my own script for this. Basically I have a bunch of posters around the map that if you press x on will play a song. If a song is already playing, it will stop that song. I don't have time to code something specific to you, but this is how mine went.
and I realize this is a very messy script with a lot of things that in it that probably don't need to be there to still make it work. But I can confirm this works 100% as it should.
ModmeBot:
Reply By: Kingslayer Kyle
Abnormal202
I actually spent a while making my own script for this. Basically I have a bunch of posters around the map that if you press x on will play a song. If a song is already playing, it will stop that song. I don't have time to code something specific to you, but this is how mine went.
and I realize this is a very messy script with a lot of things that in it that probably don't need to be there to still make it work. But I can confirm this works 100% as it should.
Not read through the full script yet but I'm pretty sure this was exactly what I was looking for.. I wanted to do something similar to you.. Thanks a bunch man :)
ModmeBot:
Reply By: Kingslayer Kyle
Abnormal202
I actually spent a while making my own script for this. Basically I have a bunch of posters around the map that if you press x on will play a song. If a song is already playing, it will stop that song. I don't have time to code something specific to you, but this is how mine went.
and I realize this is a very messy script with a lot of things that in it that probably don't need to be there to still make it work. But I can confirm this works 100% as it should.
Just tried the script for some reason I get 'Not available' when going to the trigger in game, I named the trigger and the sound 'zetsubou'
ModmeBot:
Reply By: Abnormal202
did you thread the function in the beginning? you can do that by putting
in your main function.
By the way if you want to do more than two poster songs I can help you out with that, but you need to be specific with how many you want. this function was just built with my map in mind, and is not exactly easy to manipulate.
ModmeBot:
Reply By: Kingslayer Kyle
Abnormal202
did you thread the function in the beginning? you can do that by putting
in your main function.
By the way if you want to do more than two poster songs I can help you out with that, but you need to be specific with how many you want. this function was just built with my map in mind, and is not exactly easy to manipulate.
I'm pretty sure I didn't actually haha.. What an amateur mistake.. I think I didn't do it because I didn't write the script myself lol
is there any chance you could make 10 for me? And name them ee_song1, ee_song2 and so on and rename the de and zns ones to match that? And is there any chance you could make a function to call from my maps gsc? So that I can have your script in a gsc of its own? Just so that I can keep my map name gsc clean.. Thanks a bunch man really appreciate the help :)
ModmeBot:
Reply By: Abnormal202
Copy a GSC and rename it to ee_songs.gsc. paste this into it:
in your mapname.gsc, put this above the main function:
and put this in the actual main function:
I haven't tested this out yet, so let me know if you have any problems. You're also gonna have to manually replace where it says "Dead Flowers" to put the name of the song that will be played.
ModmeBot:
Reply By: natesmithzombies
I hate to hijack the post here with another solution, but this one is dynamic (it will update to however many triggers you put in your map) and it requires very few steps to implement.
Step 1) Add this to the bottom of your mapname.gsc:
Step 2) Add this in your function main of your mapname.gsc:
Step 3) Add as many triggers around your map (trigger_damage, trigger_use, or trigger_multiple for touch) with the KVP's:
targetname - ee_song_trigger
script_string - your_song_alias_here
I tested this myself so I know it works. The post will be marked as answered. Confirm it works so the topic can be locked.
ModmeBot:
Reply By: Kingslayer Kyle
natesmithzombies
I hate to hijack the post here with another solution, but this one is dynamic (it will update to however many triggers you put in your map) and it requires very few steps to implement.
Step 1) Add this to the bottom of your mapname.gsc:
Step 2) Add this in your function main of your mapname.gsc:
Step 3) Add as many triggers around your map (trigger_damage, trigger_use, or trigger_multiple for touch) with the KVP's:
targetname - ee_song_trigger
script_string - your_song_alias_here
I tested this myself so I know it works. The post will be marked as answered. Confirm it works so the topic can be locked.
Im actually on holiday at the moment so I can't test, can you confirm if the songs can be played as many times as you want them to be? (When the song is finished I can activate it again?) And also, do the songs not play over the top of each other? Like how does that work? Can you not activate a song until the current one that's playing is over? Thanks man :)
ModmeBot:
Reply By: Kingslayer Kyle
Also, is there any chance you could do this:
have a hint on the trigger saying "press f to play Easter egg song" and another that says "please wait until current song is over" ? Thanks :D
ModmeBot:
Reply By: Kingslayer Kyle
Or another kvp to add that will define the songs name on the trigger hint that I can set on the trigger so I could set one to say 'press f to play de song' and another trigger say 'press f to play zns song' that would be sweet!!
ModmeBot:
Reply By: Kingslayer Kyle
Because some of the triggers that I'm putting in aren't going to be obvious and I don't want people to have to go round pressing F everywhere to find the songs, so I'd like a hint on the trigger that says 'press f to play "kvp goes here that holds the name of the song" ' and if there's already a song playing then it says 'please wait until current song is finished, and then I just want the songs to be able to be activated as many times as I want with no cap because on some ee song scripts you can only play the song once (sorry for all the comments btw) just wanted to be clear as I can on what I'm trying to achieve so it doesn't confuse you lol