Results 1 to 5 of 5

Thread: .fireheld, .secfireheld, and *nix

  1. #1
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default .fireheld, .secfireheld, and *nix

    Working on this code today....

    Code:
    hasMine local.player:
    if(local.player.has_mineinhand != 1) {
            local.player attachmodel "items/explosive.tik" "tag_weapon_right" 1.0 ("mdlattach" + local.player.entnum) 1 -1 -1 -1 -1 ( 0 0 0 )
            waitthread mine_huds local.player
            local.player.has_mineinhand = 1
            if(level.mine_instructions != 0) local.player thread instructions mine
    }
    if(local.player.fireheld && local.player.minelimit > 0 && local.player.placed_mine != 1) {
            local.player.placed_mine = 1
            local.player stufftext ("subtitle3 Using-Mine")
            local.player exec global/mines/mines_main.scr
            local.player.minelimit--
            waitthread mine_huds local.player
    }
    end
    I can place a mine with either left mouse click or right mouse click. Yep, either one. This code seems to only check .fireheld, not .secfireheld.

    So why does .secfireheld cause it to throw a mine? I haven't tried this on a windows server, only linux. Is .secfireheld borked there?

    Todesengel

  2. #2

    Default

    Yes is broken.

    The only way to use the sec fire you have to change the state file.

  3. #3
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    So is it broken on both windows and unix servers, or just unix?

    I've made limited changes to my statefiles as I don't understand all the ins and outs of that 100%. Generally, how to allow secondary fire trapping to work correctly?

  4. #4

    Default

    Quote Originally Posted by Todesengel View Post
    So is it broken on both windows and unix servers, or just unix?
    On both.

    Quote Originally Posted by Todesengel View Post
    I've made limited changes to my statefiles as I don't understand all the ins and outs of that 100%. Generally, how to allow secondary fire trapping to work correctly?
    Using by state file you cant detect how mutch you holding the key but only the times you pressed the key.

    On state file create a custom state for the mine:

    Code:
    MINE_KEY              : +ATTACK_SECONDARY
    On the state of the MINE_KEY execute the script you whant

    Code:
    state MINE_KEY
    {
            entrycommands
            {
    
             exec global/script.scr
            }
            
            states
            {
            STAND							: ANIMDONE_TORSO
            }
    }

  5. #5
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    276

    Default

    That really helps Doublekill, thanks!

Tags for this Thread

Posting Permissions

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