Home   Help Search Login Register  

Author Topic: Affect whole side  (Read 3172 times)

0 Members and 1 Guest are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Affect whole side
« on: 26 Mar 2005, 05:35:26 »
Hai everybady!  8)

I want a trigger that will setcombatmode "red" for every western unit. How do I do this?

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:Affect whole side
« Reply #1 on: 26 Mar 2005, 05:42:02 »
Make a trigger wich covers the whole mission area, and be sure to put activation "West". Then give a name for the trigger ex. xxx. You can set the condition to empty. When you want the side to be affected, write somewhere: {_x setCombatMode "Red"} forEach list xxx

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #2 on: 26 Mar 2005, 16:44:34 »
Nice! thanks man

Offline supershooter

  • Members
  • *
  • 2+2=4
Re:Affect whole side
« Reply #3 on: 26 Mar 2005, 17:08:23 »
lol whats red?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Affect whole side
« Reply #4 on: 26 Mar 2005, 19:36:12 »
Plenty of reviewed ArmA missions for you to play

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #5 on: 27 Mar 2005, 03:50:50 »
OHHHH IN YOUR FACE!!! hihi

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #6 on: 27 Mar 2005, 03:53:29 »
wait I don't get it what's xxx?

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:Affect whole side
« Reply #7 on: 27 Mar 2005, 06:59:35 »
ex. xxx = for example xxx. It's just the name you give to the trigger. The name can be anything!

(some letters aren't allowed)

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #8 on: 27 Mar 2005, 16:17:57 »
Ok.. Just wasn't sure if it was the group name or trigger name. Thanks buds. I'm gonna test this in a couple of hours.. I'll post if it worked.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #9 on: 27 Mar 2005, 19:05:57 »
Okay just a couple more problems and I think this thread is solved..

First of all, for anyone else using my lowly version, the only way the above command will work in the trigger activation field is by using "" not {}

ex: "_x setcombatmode red" foreach list xxx

now the problem is, you can't put red under quotations ("red") because you'll get a syntax error. So I need to find another command that can alter a unit's behaviour without quotations.

I tried doing "_x setdammage 1" foreach list xx and everyone western died. So it works. Now the only thing is to find a command without quotations.. Anyone got a clue or a work around?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #10 on: 27 Mar 2005, 19:13:03 »
Try double quotes:

""Red""

In other words;

"_x setcombatmode ""red""" foreach list xxx


Planck
« Last Edit: 27 Mar 2005, 19:14:28 by Planck »
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #11 on: 27 Mar 2005, 19:46:54 »
Nope double quotes don't work either :(

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #12 on: 27 Mar 2005, 19:57:18 »
I admit it was a long shot.

In some instances it works, in others it doesn't.

This must have been a  case of the latter.

Try all sorts of variants are you really really sure curly braces don't work.


Planck
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #13 on: 27 Mar 2005, 19:59:58 »
I did.. I tried everything.. Isn't there any other commands I can use ?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #14 on: 27 Mar 2005, 21:00:41 »
Ok prophet,

I just tried this in a trigger......set to 500 X 500.
Activated by West.....Once
On Activation........."_x setcombatmode ""red""" foreach list min

min was the trigger name


I was within the trigger range with my West squad.

And........it worked just fine, my men were ordered 'All, Engage At Will'


Planck
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #15 on: 27 Mar 2005, 21:03:26 »
strange.. This really doesn't make sense I'm going to try again

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #16 on: 27 Mar 2005, 21:06:13 »
I get an unknown operator error msg.. It detects " and halts the command :( I think its my ver hee hee

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #17 on: 27 Mar 2005, 21:15:13 »
You know you really are crippling yourself sticking with version 1.0

Why don't you download the FREE patches to take you to version 1.46?

There are a lot of extra commands and official vehicles added in the updates that you can't use.

In the long run it makes sense to update.


Planck
« Last Edit: 27 Mar 2005, 21:15:48 by Planck »
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #18 on: 27 Mar 2005, 21:20:42 »
I know its free. I know there's lots of goodies.
And I will get all the bells and whistles for the sequel. But for now its 1.0 all the way. I've been working on this campaign for about a year. Now near the end suddenly I'm gonna overhaul? Forget it it's going to add another 6 months to production time. Now, if this meant I was going to distribute something of quality of something not then yes I would upgrade. But I've put a lot of quality in this campaign, and I only need the odd command that is not avaliable. 9/10 times there's a work around and when there isn't usually its not necessary or I find a better way around it.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #19 on: 27 Mar 2005, 21:28:35 »
Let me see now, you have been using the command allowFleeing.......correct?

EDIT: I got the command wrong, but you know what I mean....I meant allowDammage.

When you release your campaign, if you do that is, everone who does not have version 1.0 will not be able to use that command because it has been removed in later versions.

I don't know about any other older commands that you have used that might have a similar effect.

I'll try to 'think' of a way around it.


Planck
« Last Edit: 27 Mar 2005, 21:32:09 by Planck »
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #20 on: 27 Mar 2005, 21:32:13 »
Oh don't worry about that.. Its only 1 or 2 missions out of 50 that use it.. And besides.. Why don't I just remove the original campaign and just leave the raw game with my campaign and distribute it that way ...

Look I know it sounds piratish, but everyone here has OFP and besides.. I don't really see pushing OFP 1.0 with the original campaign deleted as piracy compared to the distance OFP has come. Anyway, I'm sure this is going to raise all type of controversy but understand. I just like to create, and I like to pass on to other people. So don't see it as a warez statement, rather as just an error free way of distributing my campaign

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #21 on: 27 Mar 2005, 21:46:27 »
You could try making the trigger as usual, but put:

[] exec "nameofscript.sqs"

in the On Activation field.

Then make the script with the contents:

"_x setcombatmode ""red""" foreach list XXX
exit

Don't forget to name the trigger and replace the XXX with the name you use.

Put this script in your mission folder.


Planck
« Last Edit: 27 Mar 2005, 21:47:08 by Planck »
I know a little about a lot, and a lot about a little.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #22 on: 27 Mar 2005, 21:58:40 »
Yah.. Sounds good I'm gonna try it in 30mins. Thanks for all the quick responses btw!

So a command that isn't recognized inside the editor may sometimes be recognized if read from a sqs file?


Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Affect whole side
« Reply #23 on: 27 Mar 2005, 22:00:58 »
Sometimes   ;D


Planck
I know a little about a lot, and a lot about a little.

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:Affect whole side
« Reply #24 on: 28 Mar 2005, 08:30:20 »
You mean {} don't work with YOUR version?

Why not setting a variable: VariableName="red" (type somewhere) then after that "_x setCombatMode VariableName" forEach list xxx

(VariableName="red"; "_x setCombatMode VariableName" forEach list xxx)

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #25 on: 28 Mar 2005, 14:54:34 »
YOU BASTARD!

That's great! I can do the same with the inflame for the unlit campfire detection. I can't believe I didn't think of that. Great thinking bud.. I'm gonna test it soon and let you guys know 8)

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #26 on: 29 Mar 2005, 01:56:36 »
bleh. A great though my friend but it simply doesn't work.

I don't understand why setcombatmode "red" can't affect every unit on the map. and when I do it the variablename way the command passes.. But the soldiers don't react.

Offline Blanco

  • Former Staff
  • ****
Re:Affect whole side
« Reply #27 on: 29 Mar 2005, 02:49:34 »
euh...is your trigger activated by a side?

Search or search or search before you ask.

Offline Pr0ph3t

  • Members
  • *
Re:Affect whole side
« Reply #28 on: 29 Mar 2005, 20:36:45 »
of course d00d

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:Affect whole side
« Reply #29 on: 31 Mar 2005, 14:55:13 »
Maybe not putting them in a same trigger? I hope you know that the setCombatMode affects wether the unit will fire or not. It doesn't make him put his gun on his back or his hand.

Maybe trying a script. (I'm sure you know how to do it but I write it anyway)

_i=0
_array = list trigger
_count = count _array

#Loop
(_array select _i) setCombatMode "red"
_i = _i + 1
?_i < _count: goto "Loop"
exit