Home   Help Search Login Register  

Author Topic: using addaction command directly from the addon  (Read 582 times)

0 Members and 1 Guest are viewing this topic.

Offline MIG

  • Members
  • *
  • Cuidado, estou de muito mau humor...
    • Operation Farmland
using addaction command directly from the addon
« on: 23 Dec 2004, 10:51:34 »
I'm adding addaction command not through the mission folder but directly from the addon using Eventhandlers command

Code: [Select]
class EventHandlers
      {
         init = [_this select 0] exec {\fml_anbc\scripts\init.sqs};

      };

there is  a init script that is connected with several other scripts.  When i use this code
Code: [Select]
player AddAction ["Camara lenta","\fml_anbc\scripts\camlent.sqs"];everything  works fine ingame but if you are commanding a group of units the action menu has plenty of Camara lenta commands (the same number of the group members) I want this action command only performed by the player, so what should i add to the script so that happens?
« Last Edit: 23 Dec 2004, 10:53:14 by MIG »

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:using addaction command directly from the addon
« Reply #1 on: 23 Dec 2004, 11:30:57 »
Don't use eventHandlers for that, use userActions (in the config)...
I'm sure find stuff telling you how to use this in the AddOn boards...

But it goes somehow like this (syntax is funked, only an eample):
Code: [Select]
class UserActions
{
   class myNewAction
   {
       displayName="Action Name";
      condition="alive player";
      statement="this exec {mynewaction.sqs};"
   };
};
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline MIG

  • Members
  • *
  • Cuidado, estou de muito mau humor...
    • Operation Farmland
Re:using addaction command directly from the addon
« Reply #2 on: 23 Dec 2004, 16:17:31 »
Don't use eventHandlers for that, use userActions (in the config)...
I'm sure find stuff telling you how to use this in the AddOn boards...

But it goes somehow like this (syntax is funked, only an eample):
Code: [Select]
class UserActions
{
   class myNewAction
   {
       displayName="Action Name";
      condition="alive player";
      statement="this exec {mynewaction.sqs};"
   };
};

Thanks, you have solve my prob :) By that way and reducing the radius i can avoid that to happen  ;) Thanks again!!!