Jump to content

Question about comparing global values to actor levels via conditions


tehdaryl

Recommended Posts

I have 4 globals that revolve around player level

MUS_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_Upper

This 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

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 by tehdaryl
Link to comment
Share on other sites

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 by tehdaryl
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...