Profile image

Selected weapon name

879 MausTrap1946  3.6 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
    49.8k BMilan

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

    7 months ago
  • Profile image
    2,539 StinkyRice

    @SnoWFLakE0s where do i out it in?

    1.6 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!

    3.6 years ago
  • Profile image

    @SnoWFLakE0s hehehe my bad

    +1 3.6 years ago
  • Profile image
    66.7k 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 3.6 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”

    3.6 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”

    3.6 years ago
  • Profile image
    4,952 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 3.6 years ago
  • Profile image
    4,038 YoDudeChase

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

    3.6 years ago
  • Profile image
    4,038 YoDudeChase

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

    3.6 years ago