OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Maverick52 on 14 Dec 2005, 22:48:54

Title: Action menu questions...
Post by: Maverick52 on 14 Dec 2005, 22:48:54
Hey guys, I was just wondering if it is possible/has it been done to have a "sub menu" in the action menu?

Lets say I have a backpack object, that has ammo, some grenades, some smokes, and a pistol in it...

I walk up to it, and instead of having a 3 mile long list of "take ammotype1 from object...take ammotype2 from object...take grenade from object..."  would it be possible to have a "take ammo from object" then have a action menu of JUST "take ammotype1...take ammtype2...3...4....5...go back" and then after taking what you want, you could use "go back" to get the regular action menu, and then from there maybe you want grenades, so you goto the grenade menu...?

I just find it annoying to scroll through a hundred actions when your standing next to 3 dead soldiers or something like that..so i wanted to maybe incorporate this idea into a addon i am making.

thanks for the help
Title: Re:Action menu questions...
Post by: Pilot on 14 Dec 2005, 23:13:37
No, I don't think it is possible.  Those actions are hard-coded into the game and are unadjustable AFAIK. :-\

-Pilot
Title: Re:Action menu questions...
Post by: macguba on 14 Dec 2005, 23:24:43
You can certainly do it with user made Actions.    Click on the Action and it is removed from the menu, and several new ones are added; click on one of those and the existing ones disappear and another bunch appear; and so on.     I think there might be a tute or script that helps handle loads of actions, although I could be thinking of something else ... have a look round the Ed Depot anyway.   It's basically just lots of addaction and removeaction commands.    Get it all very clear in your head before you start to code it or you'll get in a muddle.

But I don't think you can mess with the game Actions: I've never heard of anybody doing it successfully.
Title: Re:Action menu questions...
Post by: Maverick52 on 14 Dec 2005, 23:49:44
Awesome, from your explanation i think it will work. I havn't started work yet, was just getting the idea thought out and checking on some possibilities. I'll definately head over to the Ed Depot when i start, thansk Mac!
Title: Re:Action menu questions...
Post by: macguba on 15 Dec 2005, 00:13:14
NP.  :)   It has definitely been done in a mission.
Title: Re:Action menu questions...
Post by: LoTekK on 15 Dec 2005, 09:40:17
One recent addon that springs to mind is Blackblood's BLEED troops (http://ofp.gamezone.cz/index.php?showthis=8632),if you want to take a look at a working example.
Title: Re:Action menu questions...
Post by: Pilot on 15 Dec 2005, 14:37:02
Are you saying that Blackblood was able to combine the built-in game actions into various subgroups?  Or did he simply combine custom actions into subgroups?

-Pilot
Title: Re:Action menu questions...
Post by: alimag on 15 Dec 2005, 15:12:48
Hi,

I would recommend in your case to use a dialog instead.
It's much more cleaner than a crowded action list. You could just use the action menu option to open the dialog and then make your selection from a list box. Neat!

Cheers
Title: Re:Action menu questions...
Post by: Tyger on 15 Dec 2005, 16:44:26
That was what I was going to suggest. Not only to dialogs look more professional and cool, they are a bit easier to use.

Try browsing the Editors Depot tutorial section if you don't know how to make dialogs. ;)