FAQ  •  Register  •  Login

Turret Weapons!

<<

Fordcars

User avatar

Posts: 985

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Dec 14, 2014 11:39 am

Turret Weapons!

The long awaited turret weapon plug-in (thanks raptor!)

  Code:
---- Turret Weapons
---- by fordcars (thanks to raptor)


function getArgsMenu()

    return "Turret Weapons",
        {
            ToggleMenuItem.new("Turret Weapon", {"Phaser", "Triple", "Burst", "Bouncer", "Seeker"}, 1, true, "Pick a weapon!")
        }
end

function main()
    local turWeapon = arg[3]
   
   local object = Turret.new(point.new(0, 0))
   object:setTeam(1)

   if(arg[3]=="Phaser") then
      object:setWeapon(Weapon.Phaser)
   elseif(arg[3]=="Triple") then
      object:setWeapon(Weapon.Triple)
   elseif(arg[3]=="Burst") then
      object:setWeapon(Weapon.Burst)
   elseif(arg[3]=="Bouncer") then
      object:setWeapon(Weapon.Bouncer)
   elseif(arg[3]=="Seeker") then
      object:setWeapon(Weapon.Seeker)
   end

    bf:addItem(object)
   
   deselectAll()
   object:setSelected(true)
end

function deselectAll()
   local selectedObjects = plugin:getSelectedObjects()
   
   for i,v in ipairs(selectedObjects) do
      v:setSelected(false)
   end
end
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1314

Joined: Thu Apr 19, 2012 2:57 pm

Post Tue Dec 16, 2014 2:21 pm

Re: Turret Weapons!

what happens if you give turrets mines.....
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 985

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 16, 2014 3:00 pm

Re: Turret Weapons!

Hah dunno :P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1314

Joined: Thu Apr 19, 2012 2:57 pm

Post Fri Dec 19, 2014 9:18 am

Re: Turret Weapons!

It would be interesting if after a ship crosses through a invisible circle it placed a mine behind the ship for a next person.
Bitfighter Forever.

Return to Editor Plugin Gallery

Who is online

Users browsing this forum: No registered users and 0 guests

cron