This is the idea:
-The player teleports to a room where I have a BT like room where they have to jump to the end and not use the SLV to fly. At the end they get teleported back to the beginning.
So I need a little script or something to remove the SLV weapon from the players inventory (or all weapons) OR just set their SLV ammo to 0. Another workaround solution would be fine too (like a no flying zone). So is there an existing script/workaround or someone willing to code this little thingy for me?
Remove weapon/set ammo to 0 script
Remove weapon/set ammo to 0 script
Last edited by Metalfist on Sun May 27, 2012 10:46 am, edited 1 time in total.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Remove weapon/set ammo to 0 script?
OFC, I'll hook you up girl. Mail me what you want done and the way you'd prefer it and I'll do it tonight or tomorrow.
So long, and thanks for all the fish
Re: Remove weapon script
Thx gopostal for coding this!
Download WeaponRemover:
Download WeaponRemover:
This is a weapon remover with some effects and sound. Place it like any trigger and pawns entering it's radius will cause it to fire. They see a flash, hear an electric boom and then all their weapons are gone.
- Creavion
- Godlike
- Posts: 4497
- Joined: Sun Feb 17, 2008 7:23 pm
- Personal rank: About to be non-act.
- Location: Germany, Lower Saxony
Re: Remove weapon script
Player used weapon remove. The attack was super effective!Metalfist wrote:This is a weapon remover with some effects and sound. Place it like any trigger and pawns entering it's radius will cause it to fire. They see a flash, hear an electric boom and then all their weapons are gone.
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Remove weapon/set ammo to 0 script
Just in case others might find this useful, here is how to specify an individual weapon(s) to be destroyed.
1) Open the weaponremover.u package in editor.
2) Subclass the weaponremover (name it whatever) and embed the new trigger in your map.
3) Edit Script on the new trigger and add this:
Now if you wanted to limit this to destroying say enforcers, you would replace the word Weapon above with Enforcer so you would have:
and for multiple weapons you could subclass more triggers or redo the code like this:
Once you get the code in just hit the "Compile changed scripts" and you are good to go. However if you want to specify weapons that are NOT stock UT weapons it will require a lot more work because you will need to add the weapon package to EditPackages, etc. That's the main reason I scripted this to just discard everything in one simple motion.
1) Open the weaponremover.u package in editor.
2) Subclass the weaponremover (name it whatever) and embed the new trigger in your map.
3) Edit Script on the new trigger and add this:
Code: Select all
function Touch( actor Other )
{
local inventory Inv;
local Weapon W;
if( Other.IsA('Pawn') && (Other != none))
{
for(Inv=Other.Inventory; Inv!=None; Inv=Inv.Inventory)
if ( Inv.IsA('Weapon'))
{
W = Weapon(Inv);
W.Destroy();
ClientFlashes();
PlaySound(sound 'electricboom');
}
}
}
Code: Select all
function Touch( actor Other )
{
local inventory Inv;
local Enforcer W;
if( Other.IsA('Pawn') && (Other != none))
{
for(Inv=Other.Inventory; Inv!=None; Inv=Inv.Inventory)
if ( Inv.IsA('Enforcer'))
{
W = Enforcer(Inv);
W.Destroy();
ClientFlashes();
PlaySound(sound 'electricboom');
}
}
}
Code: Select all
function Touch( actor Other )
{
local inventory Inv;
local SniperRifle W;
local WarHeadLauncher M;
local PulseGun P;
if( Other.IsA('Pawn') && (Other != none))
{
for(Inv=Other.Inventory; Inv!=None; Inv=Inv.Inventory)
if ( Inv.IsA('SniperRifle') || Inv.IsA('WarHeadLauncher') || Inv.IsA('PulseGun') )
{
W = SniperRifle(Inv);
W.Destroy();
M = WarHeadLauncher(Inv);
M.Destroy();
P = PulseGun(Inv);
P.Destroy();
ClientFlashes();
PlaySound(sound 'electricboom');
}
}
}
So long, and thanks for all the fish