Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: mohaa weapon choose

  1. #1

    Default mohaa weapon choose

    Can someone tell me where I can find the image shown to the player to choose a weapon when entering a multiplayer server.I've been looking for this image for weeks now, but cannot find it.Removing shotgun.tga or rocketlauncher.tga does nothing.The menu keeps showing the weapons (shotgun & rocketlauncher) even when I delete all images.I changed the image escmenu.tga, that was easy enough,and I would like to do the same with the weapon menu.But this does not seem to exist ??I could show an image if it was possible to add an attachment.But however much I click on attachment button,nothing happens.So I can't post an attachment, unfortunately.

  2. #2

    Default

    What is the point of what you are trying to achieve though? Because if you want to diasable shotgun and zooka on server you choosed weird and unpractical way, it would be better to edit tiks, that solution would be better and not annoying for your players.
    Github - Steam - .Crimewavez#5285

  3. #3

    Default

    If you want to know where is the primary weapon select menu, the menu is a full texture :

    Pak1.pk3 -> /textures/mohmenu/selectprimary.tga

    If you're running AA, you have to modify TIKI files. If you're running an SH or BT servers, the following dmflags values might help you :


    // Flags in SH/BT
    /** Disallow the usage of rifles. */
    static constexpr unsigned int DF_BAN_WEAP_RIFLE = (1 << 22);
    /** Disallow the usage of rifles. */
    static constexpr unsigned int DF_BAN_WEAP_SNIPER = (1 << 23);
    /** Disallow the usage of snipers. */
    static constexpr unsigned int DF_BAN_WEAP_SMG = (1 << 24);
    /** Disallow the usage of sub-machine guns. */
    static constexpr unsigned int DF_BAN_WEAP_MG = (1 << 25);
    /** Disallow the usage of machine guns. */
    static constexpr unsigned int DF_BAN_WEAP_HEAVY = (1 << 26);
    /** Disallow the usage of shotgun. */
    static constexpr unsigned int DF_BAN_WEAP_SHOTGUN = (1 << 27);
    /** Disallow the usage of landmine. */
    static constexpr unsigned int DF_BAN_WEAP_LANDMINE = (1 << 28);


    You can use https://bit-calculator.com/bit-shift-calculator to get actual values for dmflags
    Last edited by Ley0k; June 22nd, 2020 at 12:40 PM. Reason: Fixed values

  4. #4

    Default

    The values I've found elsewhere seem to work for me on BT:

    4194304 //rifle (1 << 22)
    8388608 //sniper (1 << 23)
    16777216 //smg (1 << 24)
    33554432 //mg (1 << 25)
    67108864 //rocket (1 << 26)
    134217728 //shotgun (1 << 27)
    268435456 //landmine (1 << 28)

  5. #5

    Default

    OK, thanks Ley0k, the image was not in Pak1.pk3 -> /textures/mohmenu/selectprimary.tga,but in Pak6Nl.pk3 -> /textures/mohmenu/selectprimary.tga.So that problem has been solved.I have another question,Bots can navigate to an object or player,as long as the player or object has contact with the Botnodes.If the object or player is too far from the Botnodes,the Bot will not be able to navigate to where the player or object is located.I'm trying to find a way to use code to check if a bot can navigate to an object or player.The only variable in Game Module Classes is canmoveto,but I have tried countless times to use this variable to check if a Bot is able to navigate to a point or not.But this variable doesn't work for what I'm trying to achieve.Is there some variable or way to determine if a Bot can navigate to a point, object or player,and return true for when he can, and false for when he can't ?

  6. #6

    Default

    "canmoveto" should work you.

    You have is to get the origin of the object, point or player.

  7. #7

    Default

    text is not displayed properly here,it's all on one line.How can i write text that is displayed normal.
    Last edited by Minami; June 22nd, 2020 at 05:38 PM.

  8. #8

    Default

    Quote Originally Posted by Minami View Post
    text is not displayed properly here,it's all on one line.How can i write text that is displayed normal.
    While writing a reply, press ENTER
    to
    add
    a
    new
    line

  9. #9

    Default this is what's printed no matter what i do, i hope someone can read this

    I have tried a lot of codefor example ne of my bot's variable is level.2nd_ranger with targetname "Ranger force"level.2nd_ranger has the instruction : level.2nd_ranger runto level.playerIf i use the code

    if( level.2nd_ranger canmoveto level.player ) // level.player is variable for all the players, being : level.player = parm.other
    {
    // Axis players get targetname $g_man, Allied players get targetname $a_man
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("MOVE TO PLAYER IS OK")
    } else {
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("NO MOVE")
    }



    I also tried instead of else which is the same :

    if!( level.2nd_ranger canmoveto level.player ) {
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("NO MOVE")
    }


    it always prints NO MOVE even when i'm in a place near botnodes, so that the bot can run to me.If i'm standing on a spot near enough to the botnodes, he runs to me,but when i go in noclip mode and stand on a roof or any place where I am too far from the bot nodes the bot stops running.
    This is what i'm reading in the qconsole.log when this happens :
    Code:
    ^~^~^ Path not found in 'Actor::MoveToPatrolCurrentNode' for (entnum 149, radnum -1, targetname 'Ranger force') from (1297.759766 -884.967957 0.125000) to (2771.064697 -405.039368 8.125002)
    Reason: couldn't find end node
    Found in attack.scr :

    i experimented with this code a lot.Changing the values after local.movepos = to anything I could find or think of to no avail

    local.movepos = ( level.2nd_ranger.forwardvector * local.checkdist ) + self.origin // local.checkdist holds the value self.dist_walkforward which has the value of 110
    self.collideresult = 0
    local.movetoresult = self canmoveto local.movepos


    if( local.movetoresult == 1 ) {
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("MOVE TO PLAYER IS OK")
    } else {
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("NO MOVE")
    }


    or

    if( local.movetoresult != 1 ) {
    huddraw_virtualsize 203 1
    huddraw_alpha 203 1
    huddraw_font 203 "verdana-12"
    huddraw_color 203 1.0 1.0 1.0
    huddraw_rect 203 300 200 625 480
    huddraw_string 203 ("NO MOVE")
    }



    This always prints the same NO MOVE whether I have contact with the bot nodes or not.I tried everything I could think of,but canmoveto did not solve the problem.
    It always prints NO MOVE whatever the situation.
    This has a huge impact on the code.I wrote code so that the bots can pick up health packs when they need one.But when the healt packs fall in a place where they have no contact with the bot nodes,the bot cannot navigate to them.This also has impact on other code i wrote,If you save a bot from an enemy, you often get a thank you or I owe you one response.
    Depending on the situation, one instruction takes precedence over another,but when bots cannot navigate to a health pack, some code will be executed too early or not at all.
    This is also due to a bug in MOHAA where the default code behavior is not followed.In certain maps, the bots fall under the map.Since there are no paths or botnodes there, they stand still and no longer participate in the game.In that case it would be interesting to be able to check if a bot is still in contact with the botnodes or not,and if not, spawn the bot again somewhere on the botnode.If a Bot drops a health pack when killed,it would also be interesting to check if that health pack has contact with the bot nodes so that bots can navigate to it,and if they can't, set the health pack to NULL, so that it no longer exists.

    EDIT BY PurpleElephant. Tried to clean up the code abit.
    Last edited by Minami; July 3rd, 2020 at 10:11 PM.

  10. #10

    Default If i'm putting ten enters between the 2 lines, it's still printed on the same line

    i don't think anybody is going to reply on the previous post,(here i put ten enters)because it's not readable at all in that way.
    Last edited by Minami; June 28th, 2020 at 03:29 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •