Home   Help Search Login Register  

Author Topic: Help with action menu pleeeeeeeeeeease :(  (Read 3811 times)

0 Members and 1 Guest are viewing this topic.

CptBravo

  • Guest
Re:Get Marker pos questions pleeeease
« Reply #15 on: 21 Jan 2004, 03:23:50 »
And all I have in mission folder is the 3 scripts to move the 3 groupes:

w1move.sqs

onMapSingleClick {w1 move _pos; leader w1 sidechat "Roger that! G1 Moving on"; gl_w1 setPos [_pos select 0, _pos select 1,0]; onMap=true; onMapSingleClick {}}

and two more scripts for w2 and w3.

The question is how where do I add the other "stuff"  ;D

Thanks

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #16 on: 22 Jan 2004, 04:03:30 »
Please tell me it is easy to do and not an impossiblity! That would shatter all my dreams and hopes in this life ( ok ok ok a bit of drama I though might solicit response quicker!)  ;D

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #17 on: 22 Jan 2004, 11:25:47 »
IT'S VERY VERY EASY AND NOT AN IMPOSSIBILITY!!


What was the question again?

Oh yes, actions.   Well you'll need the commands setBehaviour and setFormation as well, details in the command ref of course I always use the online version myself.

FirstAction = player addAction ["Whatever", "whatever.sqs"]

And then in the script called whatever.sqs you'll have a whole bunch of stuff including more addAction commands and one like this

player removeAction FirstAction

That's all there is to it.

If you haven't done so already you should take a look at the Chain of Command (CoC) mod.   They have already done this is a much larger way - in fact the onmapsingleclick command was specifically introduced by BIS to help make their stuff easier to do.
Plenty of reviewed ArmA missions for you to play

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #18 on: 22 Jan 2004, 17:48:28 »
Thanks for the response.

I am sure its very easy once I know how to do it. Just like moving groups on map via action menu. Seemed impossible till I saw the light :)

Actually I have looked and tried the CoC and its great. Only downside is its only for SP not MP.

I need something rather simple that will allow for large groups without the lag.

I guess the main challange I am having is how do you add submenue in actionmenu ? So under group one I'd have 3 more options and under each option I have three more options?  

I guess giving an example is best way to learn:

I have a trig activated by anybody once to fire script. In its activation:

FirstAction = leader gw1 addAction ["Group3","w3move.sqs"];

Then the script w3move.sqs:

onMapSingleClick {w3 move _pos; leader w3 sidechat "Roger that! G3 Moving on"; gl_w3 setPos [_pos select 0, _pos select 1,0]; onMap=true; onMapSingleClick {}}

w3 setBehaviour "COMBAT"


As you can see I am trying to add the the option of COMBAT under group 3.

And this is where I am having a hard time understanding how to add options under one group.  PLace it in different script? Trig?

Thanks



Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #19 on: 22 Jan 2004, 18:48:42 »
Hi,

if I remember correctly, uiox has written a very good tutorial on addaction. Check under his name in the editor depot (if it's working) and you should find it.

Cheers

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #20 on: 22 Jan 2004, 20:56:58 »
Thanks. I saw that one but honestly its a bit too advanced for me. He has a few scripts running together in that mission.

Ohh well...  ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #21 on: 22 Jan 2004, 21:02:44 »
There is one simple concept that you have not yet grasped.   When you do grasp it (which will be very soon) you will scream with rage and frustration that you didn't get the hang of it sooner.

I get the impression that you understand how to use addaction to make a script start running.   Is that true?   Let's assume it is.

Do you understand how to use removeAction, so that you can make an action disappear from the action menu?

Assuming you do, all we are left with is the mysterious concept.   It's this:-

In a script started by an addaction thing, you can remove the original action and also, if you wish, add new actions.    

This process can be repeated in any way you want.   So the scripts started by the new actions can remove these new actions and add another action which is exactly the same as the original one.   Or a whole new set of actions.

That's it.    If you know how to use addaction and removeaction, and you know how to make addaction make a script start, then you know everything required to make a cascading sequence of submenus.

If this post doesn't make sense (which is more than possible  ::)) read it again.     If it still doesn't make sense, highlight the bits that are gibberish and I'll explain it in a different way.   It's one of these things that's unspeakably complicated till you see the light, then it's very straightforward.

The underlying problem is that you think you don't know how to do what you want, but in fact you do.   You aren't missing any information.   All you have to do is rearrange the stuff that's already in your head.  :thumbsup:
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #22 on: 22 Jan 2004, 21:53:17 »
Just for info:

Gameer and me are working on a new version of my beta
project: MOTAG (more than a group)

As the name says: you can easily command more than a group

Features:

-Controlled by dialogue boxes

-store groups to give the same commands for multiple group at
 once

-Variable: behaviour combatmode formation speed settings

-Use of your own defined markers for the groups (allows custom
 markers like: USMC markers)

-destination set by mapclick

-custom group names to be displayed (like: 1st infantry squad)
 by default they will be: 1. group, 2. group


The main engine is built up already, i only need Gameer to make
the dialogues, and it'll be ready to go.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #23 on: 22 Jan 2004, 22:00:43 »
@macguba
What you're saying is true but (if I understand what he means correctly) making a menu system is a little bit more complicated.

For example, selecting an option taking you to an action in a list of 4 choices means removing all the actions remaining. The usual (_this select 0) removeAction (_this select 2) is not enough anymore to implement such a system.

We're now talking about saving the action IDs in variables or a global array where menu levels are explicitly defined.

Cheers

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #24 on: 22 Jan 2004, 22:07:25 »
alimag is right.

I sort of figured out to add some submenu actions but now the actions will stay there. And every time I click on a group action the subactions get added AGAIN to action menu along the other actions. And after a few clicks you have one looooong messy action menu.

SO removing all actions is one of the main issues. So I am wondering if there is more to it than just a few trigs and scripts ... ?


 
 
 
« Last Edit: 22 Jan 2004, 22:13:56 by CaptainBravo »

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #25 on: 22 Jan 2004, 22:11:06 »
Now Ronald Spiers had an excellent multi group MP mission/mod.
Only thing it can only be two players
So I was trying to see if the onMapSingleClick would fix that by allowing multi groupes in 3-4 player MP games?

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #26 on: 23 Jan 2004, 06:11:09 »
Now thatI got some of submenue action going .. How do you remove it after group is dead? I want to remove its action andsubaction from action menue after all of thegroup is eliminated.

Detailed answers are grrreatly appreciated :)

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #27 on: 23 Jan 2004, 07:17:36 »
ok I got it!!  ;D

All is left is that stubborn submenu ... sigh!


CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #28 on: 24 Jan 2004, 17:57:13 »
ok ok ok I am halfway there. Now I just need to know how to add a submenue and have it removed till next time I click on its above option again?  :(
Lets say I clicked group w1 and now I need 4 actions below that action: Combat/Stealth/Aware/Safe.

Once choosen all 4 actions will dissapear from menue till main action is clicked again.


I hope someone has a SIMPLE answer assuming there is a simple answer  ???

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #29 on: 24 Jan 2004, 18:34:48 »
I'll tell you, how i did that for my MOTAG, before using
dialogue boxes:

I've got 3 levels of action menu's.

Level 1: unit selection
(scroll thru units/add unit to pool/select all/set destination/order
movement)

Level 2: advanced options (speed/behave/formation/combatmode)

Level 3: advanced settings (change one of the settings, selected in menu level 2)

Now i do put each action, i add into an array:

once i have to change menu level, i delete the action forEach
of the array (for that, i'm always using the very same script,
no matter at which menu level).

The other script, where the new actions will be added, is
waiting for a variable to be set true by the delete action script.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted