tehdaryl Posted October 1, 2016 Share Posted October 1, 2016 I have 4 globals that revolve around player levelMUS_playerlevel (the players level)MUS_Playerlevel_Upper (the players level +20)MUS_Playerlevel_Lower (The players level -20)MUS_Playerlevel_Low (MUS_Playerlevel_lower - 10)These 4 globals work perfectly fine and return the desired float values in game when called.The problem is where i am trying to apply them, I am trying to change the combat music system to a level based system rather than animation keyword based. So i have set conditions on each of the music tracks that are essentially comparing the combat targets level to one or more of the global values specificed.For example the level check before playing boss music for track "MUSzCombatboss01"Get level combat target >= MUS_Playerlevel_UpperThis all works fine in theory but it's not actually playing properly in game. I tried setting the globals to integer values through setvalueint but that didn't fix anything.Is it just impossible to compare actor level values to a global value? Am i setting the wrong target? Should it be target instead of combat target? Are actor levels integers or floats?Any helps appreciated. Link to comment Share on other sites More sharing options...
LoneRaptor Posted October 1, 2016 Share Posted October 1, 2016 To compare to a global value you need to use GetValue(). Example: CombatTarget.GetLevel() >= MUS_PlayerLevel_Upper.GetValue() ;Not sure on the CombatTarget This would need to be defined somewhere else in your script Link to comment Share on other sites More sharing options...
tehdaryl Posted October 1, 2016 Author Share Posted October 1, 2016 (edited) Whoops I don't think I was clear. Only a tiny portion of this mod requires script (which worked well), the part actually changing the globals. I actually used the object window for the second part and just set conditions on each of the tracks using the conditions window for that part. Get level combat target >= MUS_Playerlevel_Upper.So after much messing around i can say yes it does work. you can compare globals to actor levels. Unfortunately the music system is temperamental, the music plays depending on level.. WHEN it decides to bother playing. Seems to be for a variety of reasons.I would try using some sort of script for this but I can't seeing as the combat music system is linked to a default object and i don't think you can do anything with it other than change music tracks or conditions. Edited October 1, 2016 by tehdaryl Link to comment Share on other sites More sharing options...
tehdaryl Posted October 1, 2016 Author Share Posted October 1, 2016 Thanks for the reply either way. Link to comment Share on other sites More sharing options...
FiftyTifty Posted October 2, 2016 Share Posted October 2, 2016 Have you made sure to set the condition to run on the player? Default is "Subject". Link to comment Share on other sites More sharing options...
tehdaryl Posted October 2, 2016 Author Share Posted October 2, 2016 (edited) I'm trying to compare the players combat targets level to the global, not the players level to the global. Because the globals are based around the players level (+10, -10 for instance) that way i can theoretically get certain music tracks to play only when the actor is within x levels of the player.As i said before it does work when it wants to. A death claw ten levels about the player will play boss music but so will a raider 10 levels above the player. And a death claw 30 levels below the player wont get any combat music, that all works as intended.The problem is that the music only plays sometimes in general. It seems to be because of the way Bethesda programmed the combat music. And i have very little knowledge on what actually triggers the event for combat music to play, all that i know is that it's handled by the default object "combat music". When it does play, it plays the appropriate track, WHEN it decides to play. Edited October 2, 2016 by tehdaryl Link to comment Share on other sites More sharing options...
FiftyTifty Posted October 2, 2016 Share Posted October 2, 2016 Yah, and to get the player's combat target, you need to run the condition on the player. Link to comment Share on other sites More sharing options...
Recommended Posts