OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Northgarden on 12 Jun 2006, 22:41:22

Title: Addaction
Post by: Northgarden on 12 Jun 2006, 22:41:22
I've tried searching a bit for the addaction stuff cuz i have never used it before. I understand so far that you need to put in a WP something like this: bot1 addaction ["Open Ramp","OpenRamp.sqs"]

But what i don't understand is what to put into the sqs file? I want an AI to Open a Ramp when he gets to a WP.

Prolly pretty simple so i hope someone can help me. :)
Title: Re: Addaction
Post by: OrnelP on 13 Jun 2006, 04:12:52
Add action is something only the player can use.  If you addaction the player will be able to use an action item in his menu. 

For AI that would be considered a scripted sequence.  But as far as i know there is no OPEN RAMP in any Default BIS addons.  So if your using an addon it would help to know what it is and what the readme file says...   Im guessing its a Higgins boat...  ;D

Anycase, respond to me or i will come to your house and eat all the food in your Refridgerator...
Title: Re: Addaction
Post by: The-Architect on 13 Jun 2006, 13:36:59
You put what you want to happen in the .sqs.

It's all well and good adding an action but the action has to do something.

Your ramp probably has an animation so in the .sqs would be something like,

Code: [Select]
unit animate ["Ramp", 0]
Or something like that. You'll have to dePBO the addon to find the particulars, unless it's in the readme but that's being optimistic.

Also, in your.sqs will be the commands to remove the action and replace it with, I presume, "Close Ramp".
Title: Re: Addaction
Post by: Northgarden on 13 Jun 2006, 18:11:37
lol OrneIP... i have a few beers if you wanna drop by also.  ;) And ur right it's the Higgins Boat. Though the readme says nothing important other than who made it.

I tried unPBO it but there are no Scripts in it. only PAC files, 1 P3D file, 1 config and 1 ogg.  :-\

But i will try and see what happens with the unit animate...
Title: Re: Addaction
Post by: bedges on 13 Jun 2006, 20:03:27
look in the config file. there may be an animations class. if there is, use the information there in the animate command (http://www.ofpec.com/COMREF/index.php?action=list&letter=a#animate).
Title: Re: Addaction
Post by: Northgarden on 13 Jun 2006, 23:01:18
Sadly there is no animation class in the config... i'll post it here:

// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2


class CfgPatches
{
   class Hboat
   {
      units[] = {Hboat};
      weapons[] = {};
      requiredVersion = 1.05;
   };
};
class CfgVehicles
{
   class All{};
   class AllVehicles:All{};
   class Ship: AllVehicles{};
   class SmallShip: Ship{};
   class BoatW: SmallShip{};
      class Hboat: BoatW
{
               vehicleClass="Armored";
      scope=public;
               hasGunner=0;
      hasCommander=0;
      crew="SoldierWCrew";
      cargoAction[]={"ManActPBRDriver"};
      maxSpeed=80;
      side=1;
              transportSoldier=12;
      displayName="Higgins Boat";
      accuracy=0.70;
      fuelCapacity=90;
      model="\MP_Higgens\Hboat"
      weapons[]={};      
      magazines[]={};
         
   };
};
Title: Re: Addaction
Post by: Gogs on 14 Jun 2006, 17:50:11
I think you have a very old version of that addon. If you look on the WWIIEC website, http://ww2ec.3dactionplanet.gamespy.com/ (http://ww2ec.3dactionplanet.gamespy.com/), I think you'll find the addon you are looking for, which is updated with an animated ramp.

Sorry, thats not quite true, I just checked. There is an updated higgens boat with an animated ramp, but it is in the WWIIEC US pack 1.1, which you can find http://ww2ec.3dactionplanet.gamespy.com/download.php?view.128 (http://ww2ec.3dactionplanet.gamespy.com/download.php?view.128) there.

Hope this helps....
Title: Re: Addaction
Post by: Northgarden on 14 Jun 2006, 23:24:44
Oh thx a lot Gogs.  :)

Im gonna try it out and hopefully it works. (or at least has something to work with)  ;)
Title: Re: Addaction
Post by: Northgarden on 15 Jun 2006, 13:27:19
The Higgins Boat in that pack has no config file.  ??? It's a little sad but i guess there's nothing left to do.  :(

I wanna thank the ppl who tried to help in this matter. Youre a nice bunch of ppl.  ;)
Title: Re: Addaction
Post by: The-Architect on 17 Jun 2006, 01:51:30
Send me the link.
Title: Re: Addaction
Post by: Gogs on 17 Jun 2006, 04:10:59
Just had a look. Its in the readme of the US pack 1.1.

Animated door on the higgins :

this animate [{rotgate},1]
to open

this animate [{rotgate},0]
to close

Hope this helps. :D
Title: Re: Addaction
Post by: The-Architect on 17 Jun 2006, 12:32:56
Hurah! Now you should be able to do it.
Title: Re: Addaction
Post by: Northgarden on 18 Jun 2006, 21:11:28
Hooah!  ;D

That totally solved the problem. Thank you very much.  :)
Now i can finally complete my Omaha Beach.  ;)