Home   Help Search Login Register  

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

0 Members and 1 Guest are viewing this topic.

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #30 on: 24 Jan 2004, 18:38:30 »
Another releated simple question pleeeease :)

I am using trigs to give me status of each group. So I have 10 groupes and I have 30 Trigs to have leader of group give me "chat msg" how many troops left in his squad. Works fine. Only issue it makes map ckluttry with trigs. Anyway to clean it up??

Example of one Trig:

Condition: ( count units w1) <= 11  

OnActivation: leader w1 sidechat "This is G1 .. we are engaging the enemy and we are one man down!";

I have this repeated 3 times for each group and I have 10 groups works but messy!!  >:(

Anyway to make it in one trig or script is grrrrrrrrreatly appreciated as usual :)

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #31 on: 24 Jan 2004, 18:47:04 »
Thanks Chris for respondding.

I think its the adding into an array that I don't get it. I know how to add action menue and have indivdual ones removed but that is about all I can teach myself with out jumping out of a window!   ;D

By the way yours sound a lot more sophisticated than what I am trying to!! ;D

Question a .. are you going to use the watch script by toadlife? I think it would enhance the whole thing from a technical view.

And b can I be your first beta tester!!!  ;D

Ohh and c is it going to work in MP with more than two players? Right now there is a great one by Spiers but only for two players.

Cheers

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #32 on: 24 Jan 2004, 19:27:17 »
damn - i wrote such a long reply, + attachment (MOTAG),
and then the upload fubar'ed me up.

Well, if you want, i'll send you that thingy to where you want
(PM me or so), so that you can have a look how i managed
that.

:edit - btw - to add those actions into an array is easy

let's say:

action1 = player addAction [blablabla]
action2 = player addAction [blablabla]

action_array = [action1,action2]

or if you add actions later, you could say:

action_array = action_array # [action3]

And to delete them you say:

"player removeAction _x" forEach action_array

:note - if you use to array = array + [anything] method,
then the array must already exist, or you cannot add
anything into it. This means you need to initialize the
array: action_array = []

~S~ CD
« Last Edit: 24 Jan 2004, 19:31:34 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #33 on: 25 Jan 2004, 02:26:06 »
Ughhhhhhhhhhh! Let me scream! lol

My simple mission I have been working on for days when I tested it in editor it worked out great but .. when I tested it today in LAN MP it was a SHOCK! The host could still move his groupes but the client had no control over his?!!

So I am assuming it has something to do with the client/host setting!

So I guess the first question I should have asked .. does the onMapSingleClick work in MP  ???

 

CptBravo

  • Guest
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #34 on: 25 Jan 2004, 07:25:03 »
Another question that came up after testing in MP LAN is the following:

Although it is only the host that can move groupes now, if the host gets killed, then he loses the ability to move groupes too!!  

Now to fire the script I have following in Trig:
FirstAction = leader gw1 addAction ["Group1","w1move.sqs"];

As you see I have the action associated with the group leader not an individual unit. So I am confused as to why the player (host) loses the action menu to move groupes when he respawns into one of his teammates??!

Any help on how to fix it is really appreciated!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Help with action menu pleeeeeeeeeeease :(
« Reply #35 on: 25 Jan 2004, 11:12:31 »
Well the multiplayer part is the most tricky one here.

You have to know that: every custom action happens local

Now everything you do in a custom action, will only be executed, where the action was triggered.

The example, i've sent you would work in multiplayer for
two players. The only thing which would have to be done is:

create different arrays of group, for different players.

Hell, it should even work for more than two players, but only
if everybody playable has to control his own units, without
touching units of somebody else.

Anyway, back to multiplayer and your problem:

Do you acc the actions again, once the player respawns into
the next teammember, or did you only expect them to switch
to the new leader automatically?


Let's say you want to move something by onMapsingleclick.
If the script, where onMapsingleclick is used, was started
from the action menu, then the parameter _pos only exists,
where the action was executed.

Also, if you move a marker's position, the marker will only move,
where the custom action has been executed.

You need to work with:
publicVariable "variablename"

to transfer changed variables from local to global

Also note that you can't use publicVariable for strings or arrays.
You can only do it with: numeric variables, boolean (true/false),
group/object/units.

I do not exactly know, how you did setup your scenario, and
what you've done for multiplayer yet with it.
What i know for sure is: how to make a multiplayer mission

Once i'll make motag fully multiplayer able (not too far from
now), i'll use OPF's multiplayer weakness as to my advantage.

I'll use the fact that things happen local, just to enable everybody to use the very same scripts and variables, without
them comming across somewhere.


If you want to use more complex stuff like strings and arrays
to be transfered, you need to watch out for CoC network services.


hmm - better not confuse you anymore here  :D

~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