Home   Help Search Login Register  

Author Topic: ~Echo Has Another Stupid Question~  (Read 756 times)

0 Members and 1 Guest are viewing this topic.

Echo Commando

  • Guest
~Echo Has Another Stupid Question~
« on: 31 Aug 2003, 04:07:54 »
Question 1:
I made a trigger with on activation
Code: [Select]
"_x addaction ["plant bomb","BombP.sqs"]" foreach thislist;i get an error "Unknown operator plant"

How can i fix it? ???

Question 2:
How can i make it so that when the player leaves the trigger area, He can't use the custom action?

 ;DThx 4 da help ~ 8) ~ MR COMMANDO ~ 8) ~ A NOOB IN NEED! ;D
« Last Edit: 31 Aug 2003, 04:08:26 by Echo Commando »

SheepOnMintSauce

  • Guest
Re:~Echo Has Another Stupid Question~
« Reply #1 on: 31 Aug 2003, 04:52:49 »
1. Try putting this instead :

Code: [Select]
_x = addaction ["plant bomb","BombP.sqs"]
2. To make the action vanish from the action menu just put :

Code: [Select]
player removeaction _x
That should work ok, unless your code relies on something else. ::)
« Last Edit: 31 Aug 2003, 04:53:01 by SheepOnMintSauce »

Kyle

  • Guest
Re:~Echo Has Another Stupid Question~
« Reply #2 on: 31 Aug 2003, 23:19:03 »
I think he's trying to make the action for the whole group.  I have probs with this too...I don't know how to make a command that has quotes go into a group command.  If i'm confusing you this is what I mean, something like:

"_x setunitpos "UP" foreach groupmember

with groupmember being the name of the group.  I need help with this also.

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:~Echo Has Another Stupid Question~
« Reply #3 on: 01 Sep 2003, 01:11:33 »
If you want to enclose one string inside another string, you will need to use 'double' quotes on the second string.

Like so:

"_x setunitpos ""UP""" foreach groupmember

The bold quotes take care of the second string, the normal quotes take care of the first (or outer) string.

Another (maybe easier ;D) way, is to implement the braces that BIS bought in with resistance... eg.

"_x setunitpos {UP}" foreach groupmember

OFP sees them as either single or double quotes, depending on the context they are in. Quite useful really ;)

deaddog

  • Guest
Re:~Echo Has Another Stupid Question~
« Reply #4 on: 01 Sep 2003, 15:36:40 »
Quote
How can i make it so that when the player leaves the trigger area, He can't use the custom action

Make your trigger repeating.

condition:  player in thislist

on activation: actionid=player addaction whatever..

on de-activation:  player removeaction actionid

This will add/remove the action only for the player.  There is no point adding it to AI units.