Profile image

Selected weapon name

879 MausTrap1946  4.2 years ago

So I tried to use the SelectedWeaponName function in a true/false statement, but I’m not sure what to use to represent the names of the weapons. I tried to use their in game names like “Guardian” and “Interceptor” but nothing happened. Any help?

  • Log in to leave a comment
  • Profile image
    58.3k BMilan

    @SnoWFLakE0s it's literally how it is in the Funky trees announcement post

    1.3 years ago
  • Profile image
    7,688 StinkyRice

    @SnoWFLakE0s where do i out it in?

    2.2 years ago
  • Profile image

    @SnoWFLakE0s ah, that’s was my problem. I’m pretty sure I got my information from the funky trees blog post with all the functions on it, so that’s probably where the myth came from. Thank you!

    4.2 years ago
  • Profile image

    @SnoWFLakE0s hehehe my bad

    +1 4.2 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @Highground @MausTrap1946
    .
    Y'all are wrong. I don't know how the myth of SelectedWeaponName propagated, but the correct variable name is SelectedWeapon, not SelectedWeaponName. When in doubt, verify your variables with the Funky Tree Guide.

    +1 4.2 years ago
  • Profile image

    @MausTrap1946 it doesn't work because you have to put the name of the weapon and not the part id. For example:
    SelectedWeaponName = “Boom50”

    4.2 years ago
  • Profile image

    @Gluck I put the weapon name in quotes (I tried the part name, Id, and unofficial name) and nothing happened. My code looks something like this:

    SelectedWeaponName = “Missile-Long-1”

    4.2 years ago
  • Profile image
    5,042 Gluck

    Pretty sure you didn't need to add the true/false bit, only needed the expression and weapon name. Did you put it in quotes? I'd guess that's your problem.

    +1 4.2 years ago
  • Profile image
    4,038 YoDudeChase

    Open xml for the weapon in queston and there should be a "part id"

    4.2 years ago
  • Profile image
    4,038 YoDudeChase

    Open xml for the weapon in queston and there should be a "part id"

    4.2 years ago