Home   Help Search Login Register  

Author Topic: UserAction and weapons  (Read 724 times)

0 Members and 1 Guest are viewing this topic.

Offline KTottE

  • Former Staff
  • ****
UserAction and weapons
« on: 21 Jul 2003, 20:11:51 »
Okay, I've tested this a little bit, with the class UserAction bit.
What I want to know if there is some way of getting it to work with handheld weapons. I.E an M16, M4 or M249, because I've had problems with getting that to work.
It works when I add it to a unit for instance, but when I add it to the gun itself the action doesn't show up for my player. I'm guessing this is because the action is added to the object?
But shouldn't anyone close enough get the action?
And you'd think that someone holding a gun would be close enough to it :)

But maybe the problem is you can't use actions of objects that you are holding?
I'll be helpful for any information that I can get.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline Jackal326

  • Former Staff
  • ****
  • SJB Addons
    • SJB Addons
Re:UserAction and weapons
« Reply #1 on: 22 Jul 2003, 01:27:31 »
From what I understand, weapon actions are not possible. Looking at the (demo) HK model, it seems as if BIS were planning on including a functional light (all the Memory L.O.D. points are there), but for whatever reason it hasn't been included. I guess this is because they decided against user actions for weapons etc.

If however, you do find a way to get it working, let me know as I can find great use for it :).
"...if someone did that to me, I'd smash their head in, I'd stab them, shoot 'em and push 'em off a roof!" - Dutch Wagenbach

Offline KTottE

  • Former Staff
  • ****
Re:UserAction and weapons
« Reply #2 on: 22 Jul 2003, 15:57:34 »
Sif I can't :P

I was thinking earlier today, that if you make a config that does:

Code: [Select]
cfgVehicles
{
  class default{};
  class Man : default
  {
      class UserActions
      {
           class OurCoolAction
           {
               foo=bar;
           };
      };
   };
};

Now, that would define all following cases of units inheriting from class Man (all units in fact) to be able to use said action. But I'm not sure how this works when creating an addon. However, with a mod and an accompanying config.bin it would be different, and all units in the mod would be able to use it, I think that's how the FDF Mod guys added the "Medic" action to everyone.

So, that's a solution to make all men able to use the action, when the condition is met (player hasWeapon "weaponname").
Not sure however, and like cbfa creating an entire mod just to find out. People in the process of doing their own mods however, can go ahead and try this :)
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

Offline CrashDome

  • Members
  • *
Re:UserAction and weapons
« Reply #3 on: 02 Aug 2003, 06:34:46 »
How does BIS add the actions for placing satchels? Is that Ammo specific or on All units?

Offline KTottE

  • Former Staff
  • ****
Re:UserAction and weapons
« Reply #4 on: 02 Aug 2003, 10:16:22 »
That's a whole different thing. They have the weapon "put" coded into the game, and the satchel weapon has a property in the config that tells it to be placable as such.
But you can't use that to fire your own scripts, which is what I want to do.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"