Home   Help Search Login Register  

Author Topic: How to remove the action "Gear" and how to write an alias of it?  (Read 2646 times)

0 Members and 1 Guest are viewing this topic.

Offline Bebop182

  • Members
  • *
Hi there,
For a custom mission ( soon to be released ;P ) purpose i had to create a new object, namely a "Coffre Fort" or a Safe. I had few trouble with texturing (UVmapping and stuff) but that's an other story. Now comes the time to make my model a real object for Arma 2...
The model is animated, the handle rotates and the door can be opened (no shit! =D).

Quote
I need to know few things in order to finish this safe:
   My Safe has a cargo capability, but the "Gear" action must not be available when the safe is closed.
       So the idea is to remove the action "Gear" and add an equivalent to class UserActions, i will make it available when the "open door" animation is finished.

-So the question is in the title, how can i do that?

Please help, it will make a great COOP 6 reach the release stage.
Config.cpp and model.cfg can be given on demand.

Thank you for reading this.




Long live the Banana King!
« Last Edit: 04 May 2012, 20:49:00 by Bebop182 »

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
I'd be VERY surprised if it was possible to inhibit/re-enable a basic feature of an ammo box or container.
Switching on and off "Gear" seems impossible to me.

If you are using UserActions to Open/Close the door, instead I'd suggest creating an an additional addon, an invisible ammo box (has GEO, memory, view lods etc, but very very small or no Resolution LOD) and spawning/AttachTo that box inside your safe when its open, via the same script to animate the door open, then deleting (or detach and setpos[0,0,0] on map) it once the door is closed.
Make sure the center of your safe is hollow in the Geometry and ViewGeo Lod so a player can interact with something spawned in its center.

Offline Bebop182

  • Members
  • *
Thank you for your response.

The trick is clever, however I would like to get rid of the "Gear" action. "Rob" or "Take" fits better. So do you know where the action Gear is defined? Can i code an action that work the same way?
If you got the answer to those questions i may simply define my own ammoBox class directly from the All class.

Again thank you for your time (and thank you for your work as it made me want to play with O2 =) )

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Try adding;

class TransportMagazines{};
class TransportWeapons{};

to the config

or try these and make them all zero.

transportMaxWeapons = 5000;
transportMaxMagazines = 20000;
transportMaxBackpacks = 1;
transportAmmo = 0;
transportRepair = 0;
transportFuel = 0;
supplyRadius = 1.4;