Song Triggers - CharGolden-Games/VS-Char-Revitilized-DB-Archive GitHub Wiki
Basically, i wanted to be able to code multiple events into 1 reuseable event.
VS Char Revitalized vIndev-1
SinceSong Triggers is a concept originally done in Marios Madness where, by tying hardcoded events to chart events you can use everything you already had access to in source, but can be set to only trigger on certain songs. i explained this badly im quite sure.
Accessed in lua (And HScript) scripts via
songNameToTrigger(songName)
if in HScript: songNameToTrigger(songName:String)
songName
Self explanatory, formatted to song data path
- This isn't neccassary to put in your scripts, but useful if you wanna make sure a song's triggers will actually trigger.
doTrigger(songTrigger, strumTime, value1, value2)
if in HScript: doTrigger(songTrigger:String, strumTime:Float, value1:Float, value2:Dynamic)
songTrigger
: Defaults to whatever the name is in Chart Editor <E.g. "Philly Nice" is "Triggers Philly Nice" and "triple-trouble" (Although in source it becomes "Triggers Triple Trouble") is "Triggers triple-trouble">
strumTime
Unneeded except for triggerEvent() in source, which requires strumTime
value1
: The trigger to look for
value2
: If the trigger has arguments, specify here!
(WORKING ON THE ABILITY TO CHANGE THE NAME OF THE TRIGGERS!)
Examples - doTrigger
Example in lua:
function doTrigger(songTrigger, strumTime, value1, value2)
if songTrigger == 'Triggers Dad Battle' then
debugPrint('Dad Battle!')
end
end
Example in Hscript:
function doTrigger(songTrigger:String, strumTime:Float, value1:Float, value2:Dynamic) {
if (songTrigger == 'Triggers Dad Battle') {
debugPrint('Dad Battle!');
}
}
Examples - songNameToTrigger
Example in lua:
function songNameToTrigger(songName)
if songName == 'dad-battle' then
return 'Triggers Dad Battle'
end
end
Example in Hscript:
function songNameToTrigger(songName:String) {
if (songName == 'dad-battle'){
return 'Triggers Dad Battle';
}
}
Adding triggers to existing songs
Of course, obviously theres already triggers set for songs that came with either Base VS Char Revitalized or the (Planned) legacy expansion.
so heres the songs and their triggers!
// Current Songs
// Unique to Revitalized
case 'high-ground':
return 'Triggers High Ground';
case 'triple-trouble':
return 'Triggers Triple Trouble';
case 'saloon-trouble':
return 'Triggers Saloon Troubles';
case 'conflicting-views':
return 'Triggers Conflicting Views';
case 'ambush':
return 'Triggers Ambush';
case 'origins':
return 'Triggers Origins';
case 'obligatory-bonus-song':
return "Triggers Char's Bonus Song";
case 'neighborhood-brawl':
return 'Triggers Neighborhood Brawl';
// Mixes
case 'blubber':
return 'Triggers Blubber Micheal Mix';
case 'junkyard':
return 'Triggers Junkyard Zavi Mix';
case 'defeat-odd-mix':
return 'Triggers Defeat ODDBLUE Mix';
case 'defeat-char-mix':
return 'Triggers Defeat Char Mix';
// Old Songs
case 'high-ground-old':
return 'Triggers High Ground Legacy';
case 'free-movies-free':
return 'Triggers Wega';
case '3-problems':
return 'Triggers Triple Trouble Cover Old';
case 'slow':
return 'Triggers Too Slow Cover';
case 'you-can-walk':
return "Triggers You Can't Run Cover";
case 'vesania':
return 'Triggers Vesania Cover';
case 'shenanigans':
return 'Triggers Shenanigans';
[!TIP]
To check which cases are already used, refer to here
its pretty simple to add a case to an existing song
in lua:
function doTrigger(songTrigger, strumTime, value1, value2)
if songTrigger == 'Triggers High Ground' then
if value1 == 7 then
debugPrint('Screw You!')
setProperty('camHUD.visible', false)
end
end
end
in HScript
function doTrigger(songTrigger:String, strumTime:Float, value1:Float, value2:Dynamic) {
if (songTrigger == 'Triggers High Ground') {
switch (value1) {
case 7:
debugPrint('Screw You!')
setProperty('camHUD.visible', false)
}
}
}