Home   Help Search Login Register  

Author Topic: Hide action command  (Read 2465 times)

0 Members and 1 Guest are viewing this topic.

Offline clava

  • Members
  • *
Hide action command
« on: 03 Jan 2008, 03:22:37 »
Hi!

I've got a problem... you know, when you add an action to a player, then when another player gets close to it (no matter side or anything), that person can use the action... The problem is that i'm making an infiltration mission and if by chance, the player has a special action with him, then the other player, if he walks close, he can see that action in his menu and then figure out that someone is close to him.

I've made some things to avoid this, like only adding the action when the unit gets close to where he needs to use it and then remove it... but i wan't to be automatic... is there a way to do this???

(i don't want to use the radio)

Thanks!


Offline dr. seltsam

  • Members
  • *
Re: Hide action command
« Reply #1 on: 03 Jan 2008, 03:49:18 »
yep,

instead of using a term like:

my_new_action=p1 addAction ["something","somescript.sqs"]

better use:

my_new_action=player addAction ["something","somescript.sqs"]

When u use the term   player  , only the human player on his computer will have access to that new action, and noone else.
 :D
« Last Edit: 03 Jan 2008, 03:55:08 by dr. seltsam »

Offline clava

  • Members
  • *
Re: Hide action command
« Reply #2 on: 03 Jan 2008, 04:01:16 »
I love you!

Thanks!!
« Last Edit: 04 Jan 2008, 09:05:07 by h- »

Offline clava

  • Members
  • *
Re: Hide action command
« Reply #3 on: 04 Jan 2008, 06:27:27 »
The only thing is that it adds to every player the action... So I guess i have to add id that way, and then remove it from any other soldiers in the map.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Hide action command
« Reply #4 on: 04 Jan 2008, 09:20:10 »
:welcome: Welcome to OFPEC clava :welcome:

A friendly noter, we do not allow consecutive posting (replying to yourself) within this short time period, a couple of days should pass first.
So if you have something to add to your post after a short period of time modify it instead of replying to yourself :)
Oh, and I accidentally did something with one of your posts and it shows that I edited it although I didn't  :D


Not sure if you have solved your porblem completely yet, so
Quote
the other player, if he walks close, he can see that action in his menu and then figure out that someone is close to him.
Umm, is the player who has this special action special in some other way, like a type of soldier that no other player is on the map?
If he is then you could try to add the action to a certain unit type only, or something like that :dunno:

Or is this just some MP issue that added actions are global no matter what..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: Hide action command
« Reply #5 on: 04 Jan 2008, 12:30:31 »
Just in case you need to know, going back to your original proposed solution - adding the action when the player is close to where he needs to use it:

You can do this by creating a repeating trigger covering the area where you wish the action to be active. Synchronise the player with it such that it will only fire when the player is in the trigger area.  In the trigger's activation field put the code to add the action to the player and in the deactivation field put the code to remove the action.

As the player moves in and out of the trigger area the action will be added and removed as required.

Offline clava

  • Members
  • *
Re: Hide action command
« Reply #6 on: 04 Jan 2008, 16:23:34 »
Yeah... i did it that way before asking thi ... that was my only posible solution...

It's seems the better way...

This is an MP mission, that's why so much trouble...

But thanks everybody for your help!


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Hide action command
« Reply #7 on: 04 Jan 2008, 17:29:53 »
You should have posted this in the MP topic.

For MP do what THobson said above, but do not synch the trigger with any players. Instead set the trigger Condition to:
Code: [Select]
player in thisList
urp!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Hide action command
« Reply #8 on: 05 Jan 2008, 09:28:24 »
Quote
You should have posted this in the MP topic
Oops, completely forgot to move this.
Moving now....
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline schuler

  • Contributing Member
  • **
Re: Hide action command
« Reply #9 on: 05 Jan 2008, 11:11:09 »
not very good with MP's , but in the com  ref there will be a removeactioin ,,,,,,hope that points you in the right direction or other staff to help :D schuler
Semper Fi