Home   Help Search Login Register  

Author Topic: 9-5-7-2 All Danger!  (Read 1036 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
9-5-7-2 All Danger!
« on: 19 Mar 2005, 22:43:56 »
You know when you use the numbers to get your guys to do stuff, like in the thread title? Is there any way I can add stuff to that so that I can press, something like 9-5-x-x and they'll do something. I can write a script which will be activated if its possible. Is it possible?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:9-5-7-2 All Danger!
« Reply #1 on: 20 Mar 2005, 01:46:29 »
No. Unless y'wanna mess round with the core files and do a mod or something.

:beat: *Gets Shot* :beat:

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:9-5-7-2 All Danger!
« Reply #2 on: 22 Mar 2005, 03:06:05 »
That's a real pain in the arse. Anyone have any idea on how I would do it the way Armsty said?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:9-5-7-2 All Danger!
« Reply #3 on: 22 Mar 2005, 09:01:59 »
Making any kind of Mod does not solve your problem...
You would need to re-write portions of the game engine to achieve what you want...
afaik...
« Last Edit: 22 Mar 2005, 09:02:32 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

UNN

  • Guest
Re:9-5-7-2 All Danger!
« Reply #4 on: 22 Mar 2005, 09:14:42 »
Quote
Is there any way I can add stuff to that so that I can press, something like 9-5-x-x and they'll do something.

You can do exactly that, but you have to make your own addon. Well I say addon, it would just contain a simple config.cpp that adds some user actions to soldiers. You define the user actions, so they can only be accessed using the command menu.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:9-5-7-2 All Danger!
« Reply #5 on: 22 Mar 2005, 17:01:26 »
Cool, that's looking promising. Can you elaborate?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

UNN

  • Guest
Re:9-5-7-2 All Danger!
« Reply #6 on: 23 Mar 2005, 02:21:40 »
The config would look something like this:

Code: [Select]
class CfgPatches
{
   class CustomSoldiers
   {
      units[] = {CustomSoldierWB};
      weapons[] = {};
      requiredVersion = 1.01;
   };
};

class CfgVehicles
   {
   class All {};
   class AllVehicles: All {};
   class Land: AllVehicles {};
   class Man: Land {};
   class Soldier: Man {};
   class SoldierWB: SOldier {};

   class CustomSoldierWB: SoldierWB
      {
      displayName= "Custom Soldier";
      class UserActions
         {
               class CustomAction
                  {  
                 displayName="Custom Action";
                 position="zbran";
                    radius=0.5;
                 condition="This!=Player";
                 statement="[This] Exec ""CustomScript.sqs""";
                  };
         };
      };
   };

Because the radius has been set to 0.5, only the soldier assigned the action will activate it.

Code: [Select]
This!=Player
Should stop the action becoming available to you in the traditional way. So if you select the AI using function keys and bring up the action menu you will see your new commands.

I used this for my Observer, here's a screen shot:



Depending on what you want to do, you might have to add some code to work out who has been selected from your group.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:9-5-7-2 All Danger!
« Reply #7 on: 23 Mar 2005, 08:20:12 »
UNN you b......!! ;D

Altough I went through your Observer stuff back in the day I must have completely missed this one...
So now you caused me to rewrite quite a bunch of FWW2 scripts ;) :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:9-5-7-2 All Danger!
« Reply #8 on: 23 Mar 2005, 23:14:09 »
That's one helluva good workaround. Huzzah! ;D

:beat: *Gets Shot* :beat:

EDIT: Actually, you shouldn't need an addon for that. Just use an addaction and it'll work. :)

:beat: *Gets Shot* :beat:
« Last Edit: 23 Mar 2005, 23:14:59 by dmakatra »

UNN

  • Guest
Re:9-5-7-2 All Danger!
« Reply #9 on: 24 Mar 2005, 03:58:52 »
Quote
EDIT: Actually, you shouldn't need an addon for that. Just use an addaction and it'll work.

Yeah, but there displayed for any unit within a 50 meter radius of the unit carry the action. It was easy for me to include them in my addon. But it would have been nice to have radius and condition parameters, for the AddAction script command to.
« Last Edit: 24 Mar 2005, 04:01:35 by UNN »

Offline 456820

  • Contributing Member
  • **
Re:9-5-7-2 All Danger!
« Reply #10 on: 25 Mar 2005, 09:57:48 »
i think i know of an easyier way i dont know if it will work with scripts but it does wwith sounds i was downloading a sound mod of a site once and i came across something else you put some files into a folder called "Sound" wich is placed in your folder
codemasters/operationflashpoint/users/yourname
put the folder there put the files in it and in game when you press 0,9,x it plays a sound with no messing with interior game files try it with scripts may work

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:9-5-7-2 All Danger!
« Reply #11 on: 27 Mar 2005, 03:16:48 »
Actually there is a big benefit of using the config.cpp actions instead of the scripting command. As UNN said, you can define the radius of the action. Also, you can set a condition that must be true, or else the action will not be displayed. That makes it much more useful and versitile than the scripting command (because you have to use lots of workarounds to get those actions added/removed at the right time).

On a side note, I read somewhere that it is possible to change some of the default command options. However, you can only change them to instead use the normal radio menu options (the ones defined by radio triggers), and you must edit the game config. So it doesn't really make it that useful compared to UNN's idea.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

UNN

  • Guest
Re:9-5-7-2 All Danger!
« Reply #12 on: 27 Mar 2005, 16:15:54 »
Cpp useractions are quite pwerfull, you can probably use them for lots of other things.  They only become active (i.e. There condition starts to be checked) when a human player gets within the defined radius.  A human is classed as, your player character (obviously), the player switching Camera view to an AI, or accessing an AI's command menu. So they would be ideal for launching and stopping any visual effect scripts.

I posted a script over at the offical forums for starting animations in map objects. You could give mission editors access to define their own custom useractions, if you used the same principle with global arrays. Although they would not work as efficently as fixed actions in the cpp.

hermano

  • Guest
Re:9-5-7-2 All Danger!
« Reply #13 on: 24 May 2005, 17:33:42 »
You might want to have a look at the CoC command engine,
http://www.website.thechainofcommand.net/command_engine.htm
They created some scripts to use 4 (or even more) digit command selections with the standard radio commands, like 0,1,5,4.
Had been some time since I had a look at it, so I don't really recall how they did it. This might be a solution that uses scripts only, no config alteration.
h