Where could i change the effect with the "Weapon Sets"

View previous topic View next topic Go down

Where could i change the effect with the "Weapon Sets"

Post by napVpan on Mon Feb 07, 2011 6:06 pm

There is a effect in the Worm Pot with this "Weapons Set" for every Worm (for example Worm 1 got a Bazooka), how could i replace this, with a different effect, and how could i change the weaponsets of the worm? ;-)
avatar
napVpan
Standard Member

Posts : 45
Activity Points : 52
Reputation : 0
Join date : 2011-01-29
Age : 23
Location : Germany

View user profile

Back to top Go down

Re: Where could i change the effect with the "Weapon Sets"

Post by Fireworm on Mon Feb 07, 2011 8:59 pm

You might be able to change this in Wormpot.lua which is located in the scripts folder. I'm not sure, but is the name of the wormpot mode "worm specialists"?

______________________________________________________________________________________________________________________
I'm done here. I want to call this site home, but I can't. There is nothing go to here, it's just a barren wasteland.
If you want me back, give me a call when the one-man show is over.

~Sincerely, Fireworm.

Fireworm
Standard Member

Posts : 493
Activity Points : 622
Reputation : 88
Join date : 2010-01-27
Age : 23

View user profile

Back to top Go down

Re: Where could i change the effect with the "Weapon Sets"

Post by napVpan on Mon Feb 07, 2011 9:24 pm

[quote="Fireworm"]You might be able to change this in Wormpot.lua which is located in the scripts folder. I'm not sure, but is the name of the wormpot mode "worm specialists"?[/quote]
I think it was something like this. Ok i will try something but i really fail at tweating and i donīt know the most words for the weapons.

E:/ I found this: well i think i have enough tweaking skills to change that, but do you have any Ideas what would be cool?

function SetSpecialistTeam(NumOfWorms, LocalTeamIndex)

local WormIndex = 0
local WormContainerName = lib_GetWormContainerName(WormIndex)
local CurrentWorm = 1
local SpecialistWormTypeTable = { 0,1,1,5,5,5, 0,2,3,6,6,6, 0,0,4,3,3,3, 0,0,0,4,4,4, 0,0,0,0,6,6, 0,0,0,0,0,3 }
local Index = 0
local SpecialistWormType = 0

if NumOfWorms > 1 then
while WormContainerName ~= "" do
local WormLock, WormContainer = EditContainer(WormContainerName)

if WormContainer.TeamIndex == LocalTeamIndex then

local InventoryLock, Inventory = EditContainer(lib_GetTeamInventoryName(LocalTeamIndex))

index = ((CurrentWorm - 1) * 6 ) + NumOfWorms
SpecialistWormType = SpecialistWormTypeTable[index]

if SpecialistWormType > 0 then

-- Firstly disable all this worms weapons
DisallowAllWeapons(WormContainer)

-- Now enable the appropriate weapons for the worm type


if SpecialistWormType == 3 or SpecialistWormType == 2 then
-- Melee
WormContainer.AllowShotgun = 1
WormContainer.AllowAirstrike = 1
WormContainer.AllowLandmine = 1
WormContainer.AllowFirePunch = 1
WormContainer.AllowProd = 1

Inventory.Shotgun = -1
Inventory.Airstrike = 1
Inventory.Landmine = 2
Inventory.FirePunch = -1
Inventory.Prod = -1
end

if SpecialistWormType == 4 or SpecialistWormType == 2 then
-- Engineer
WormContainer.AllowNinjaRope = 1
WormContainer.AllowGirder = 1
WormContainer.AllowDynamite = 1
WormContainer.AllowParachute = 1
WormContainer.AllowBaseballBat = 1
WormContainer.AllowSheep = 1
WormContainer.AllowTeleport = 1

Inventory.NinjaRope = 5
Inventory.Girder = 3
Inventory.Dynamite = 1
Inventory.Parachute = 2
Inventory.BaseballBat = 1
Inventory.Sheep = 1
Inventory.Teleport = 2
end

if SpecialistWormType == 5 or SpecialistWormType == 1 then
-- CANNONADE
WormContainer.AllowBazooka = 1
WormContainer.AllowHomingMissile = 1
Inventory.Bazooka = -1
Inventory.HomingMissile = 1
end

if SpecialistWormType == 6 or SpecialistWormType == 1 then
-- Grenadier
WormContainer.AllowGrenade = 1
WormContainer.AllowClusterGrenade = 1
Inventory.Grenade = -1
Inventory.ClusterGrenade = 3
end


end

CloseContainer(InventoryLock)

CurrentWorm = CurrentWorm + 1

if CurrentWorm > NumOfWorms then
CloseContainer(WormLock)

local DelayLock, DelayContainer = EditContainer("Inventory.WeaponDelays.Default")
DelayContainer.HomingMissile = 1
DelayContainer.Airstrike = 5
CloseContainer(DelayLock)

-- Setup Default Weapon Delays

local index
for index = 0,3 do
lib_SetupTeamWeaponDelays(index, "Inventory.WeaponDelays.Default")
end

break
end

end

CloseContainer(WormLock)

WormIndex = WormIndex + 1
WormContainerName = lib_GetWormContainerName(WormIndex)
end
end

end
avatar
napVpan
Standard Member

Posts : 45
Activity Points : 52
Reputation : 0
Join date : 2011-01-29
Age : 23
Location : Germany

View user profile

Back to top Go down

Re: Where could i change the effect with the "Weapon Sets"

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum