Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Flyable Planes Mod

  1. #11

    Default

    I did not add anything other than you mentioned. It could be because I am using a version I found I had archived (used this one because it seemed to run a bit smoother than your version when in flight). While still by Elgan it did include other mods that seem essential for the planes to run such as something titled Neagle which looks like an anti-shark feature or something with the Anti-Camp mod. (for example I tried to remove everything but the strings scr and plane files but found the anti-camp scr was needed.)

    I'll attach the pk3 of planes that works, and the one where I changed what you mentioned above (I've been using mohdm2 for the plane tests)

    https://1drv.ms/f/s!AkRez-Qci5HZi1DvV9QWE5ZhgMUE

  2. #12

    Default

    the problem was with the trigger being called multiple times, because the "nottriggerable" command was at the bottom of the thread
    with this code it should be working fine


    fly:
    self nottriggerable
    local.player = parm.other

    if(local.player.flying!=1 || local.player.OWNS == 1)
    {
    local.team = parm.other.dmteam

    local.use_teams = waitexec global/settings.scr::getcmd "use-teams"

    if (local.use_teams == "1")
    {
    if(self.team != local.player.dmteam)
    {
    local.player iprint "You don't have the training for this aircraft"
    local.plane = waitthread find_trig self.team self

    local.plane light 0 0 1 100
    waitframe

    local.plane light 1 0 0 50
    end
    }
    }


    local.player weaponcommand dual targetname ("weapon" + local.player.entnum)
    local.weapon = $("weapon" + local.player.entnum )
    if (!local.weapon) {
    local.player holster
    } else {
    local.weapon targetname ""
    }
    wait 0.5
    if (!local.player) {
    self triggerable
    end
    }

    local.player.plane_start = self.start_pos
    local.player scale self.plane_scale
    local.player exec server_planes/server_fly.scr
    local.player.flying=1

    local.trigdelay = waitexec global/settings.scr::getcmd "trig-delay"
    local.trigdelay = int local.trigdelay

    local.trig = waitthread find_trig self.team self
    local.trig hide

    wait local.trigdelay

    local.trig show
    self triggerable
    }
    end

  3. #13

    Default

    Tested it out and it works. Thanks for your help!

  4. #14

    Default

    I forgot to make it triggerable after being triggered by someone from another team
    please, add this "self triggerable" line to fix it

    Code:
            if (local.use_teams  == "1")
            {    
                if(self.team != local.player.dmteam)
                {
                    local.player iprint "You don't have the training for this aircraft"
                    local.plane = waitthread find_trig self.team self
    
                    local.plane light 0 0 1 100
                    waitframe
                    
                    local.plane light 1 0 0 50
                    self triggerable
                    end
                }
            }

  5. #15

    Default

    Added the line, and I'm not sure if it caused this or I didn't notice before, but it seems on occasion if a team has two plane triggers and you go into one and jump out at the other sometimes the second trigger will not work for the remainder of the map. Is the weapon draw command have to do with this issue?

    Edit: I'm not 100% sure but it looks like it is caused if you try to go into the second plane trigger before the first appears (have to fly to 2nd trigger fast and bail to cause bug)
    Last edited by The Shadow; February 27th, 2019 at 07:35 AM.

Posting Permissions

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