Author Topic: Item Dropping.  (Read 2387 times)

That wouldn't work because
Doesn't that not have a %slot value and just drops your current tool?
and anyone could just /dropAllTools personname to anyone with no restriction.
This doesn't need to be a server command.

That wouldn't work because and anyone could just /dropAllTools personname to anyone with no restriction.
This doesn't need to be a server command.

Oh yeah. You're right.

Silly me.  :cookieMonster:

Code: [Select]
function DropItemProjectile::damage(%this,%obj,%col,%fade,%pos,%normal)
{
if(isObject(%col.client))
{
serverCmdDropTool(%col.client);
}
}

I tried this one because it is a projectile datablock. It didn't work. When I hit myself, nothing happened.

I tried this one because it is a projectile datablock. It didn't work. When I hit myself, nothing happened.
You need to be in a minigame where you can damage yourself.

I was in a minigame.

I was in a minigame.
Did you package the function? You should learn the basic facets of scripting before you attempt to copy and paste others' code.

Code: [Select]
function NoJetRayProjectile::Damage(%this,%col,%obj)
{
      if(%obj.getType() & $Typemasks::PlayerObjectType)
      {
            %obj.changeDatablock(PlayerNoJet);
      }
}

This on I don't have packaged and it still works.

You should learn the basic facets of scripting
Sorry mate, but major irony.
You only need to package if you're modifying how a class does a function usually, not when you are modifying how a certain object does things. (however there are a few cases where you need to package)

Sorry mate, but major irony.
You only need to package if you're modifying how a class does a function usually, not when you are modifying how a certain object does things. (however there are a few cases where you need to package)
Excuse me? Uhm...doesn't he want all the players in his server to drop weapons when they get damaged no matter what the weapon? Wouldn't you need to package in that case to change the functionality of damage done to players and then call the parent? Or am I not understanding what his question is.

You should learn the basic facets of scripting before you attempt to copy and paste others' code.
My statement still stands.
« Last Edit: April 17, 2010, 07:04:58 PM by Radial543 »

This is what I want.

1. I pull the trigger.
2. The projectile leaves my gun.
3. The projectile soars through the air.
4. The projectile misses hits the victim.
5. The victim then automatically drops the weapon he is holding.
« Last Edit: April 17, 2010, 07:48:48 PM by Butler »

This is what I want.

1. I pull the trigger.
2. The projectile leaves my gun.
3. The projectile soars through the air.
4. The projectile misses hits[/s] the victim.
5. The victim then automatically drops the weapon he is holding.
Wait, if this is for one specific weapon then don't take my advice. I misunderstood what you were trying to do and thought that you wanted to make players drop weapons whenever they get damaged.

Ahh. But, still, Destiny's projectile datablock doesn't work. I don't know how to fix t because I get no error reports and whenever I shoot somebody, they didn't drop their weapon and vice versa. I tested it with a couple of my friends.


I forget the functions, its something like this, someone will have to correct it- NOT flame it.

Code: [Select]
package ImUgly
{

function GameConnection::onDamage(%obj, %col) //I forget I'm on a laptop with no access to code.
{
serverCmdDropTool(%col.client); //I'm not sure if thats right
parent::onDamage (%obj, %col) //Once again  :cookieMonster:
}

}
activatePackage(ImUgly);

Thats what it will end up looking like basicly, but I'm positive it won't work like that. Someone correct it without flaming it.

I forget the functions, its something like this, someone will have to correct it- NOT flame it.

-snip-

Thats what it will end up looking like basicly, but I'm positive it won't work like that. Someone correct it without flaming it.

I don't need a package, that was already established. I need a projectile datablock.