Home   Help Search Login Register  

Author Topic: A Trigger related question...  (Read 828 times)

0 Members and 1 Guest are viewing this topic.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
A Trigger related question...
« on: 08 Jan 2004, 02:50:32 »
How exactly would I make a trigger that activates when there's less NME present than a certain value and players leader knowsabout the NME (left) below a certain value?

To simplify (example, not an 'code' attempt...):
count NMEpresent < 3 && (leader group player) knowsAbout NME < 1

Tried this way already (with few variations) without any luck:
(count thisList) < 3 && "(leader group player) knowsAbout _x < 1" count thisList > 0

Is this possible at all or am I way off with these 'codes' of mine...
« Last Edit: 09 Jan 2004, 18:04:16 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A Trigger related question...
« Reply #1 on: 08 Jan 2004, 03:45:57 »
You're definitely on the right lines.   I suspect your problem is that knowsabout applies to each different enemy loon.     In other words, what exactly do you want your condition to be?   We know the first part is count <3 or whatever, that's easy.   (Make it work on its own first.)    But as for the second part, what do you really want?   Is it

leader grp knowsabout leader enemygroup < 1

or

leader grp knowsabout all enemy < 1

or

leader grp knowsabout at least one of enemy < 1

and so on.    Do you see what I mean?

Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #2 on: 08 Jan 2004, 10:15:37 »
Yup, the count <3 works just fine...

The second part I want can be (I think...) actually two of your examples:

Quote
leader grp knowsabout all enemy < 1

or

leader grp knowsabout at least one of enemy < 1


The thing that I'm after with this is that I wan't to reduce the chances of a player needing to hunt down that last hiding NME, but also trying to reduce the chances of the trigger to activate (objective complete) when there's less NME than the given value BUT one of the remaining NME just happens to stand right in front of you with finger on the trigger...

If there's a better way than this, I'd be happy to know...
« Last Edit: 08 Jan 2004, 10:16:03 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Quid Novi

  • Guest
Re:A Trigger related question...
« Reply #3 on: 08 Jan 2004, 11:31:25 »
make a list of the enemy.... place a trigger, detection enemy,

on activation:

enemies = count thislist

then check for how many there are in the objective trigger: (not sure about this line, don't have it in memory for some reason) i think it is:

(alive (_x foreach enemies)) <= #

well, actually, i think thats wrong... not sure about the second part, sorry  ::)
« Last Edit: 08 Jan 2004, 11:33:33 by : Carpe Diem : »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A Trigger related question...
« Reply #4 on: 08 Jan 2004, 22:14:48 »
Ah, if that's the underlying problem then it's easy.   There are lots of possibilities.   Try this:-


Trigger1
Activation box:    enemy present
Countdown (or is it timeout ..)    60    120   90
Condition:   enemy <  3
On activation:    allowfleeing 1 forEach thislist

Trigger2
Activation:   Enemy not present
Type:   End#1


In other words, about 90 seconds after the enemy get down to their last 3 men they all start to flee.   Syntax not guaranteed.


Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #5 on: 09 Jan 2004, 09:31:37 »
Actually that still does not make the problem go away...  :P

When that particular trigger goes off I have a cutscene that 'pops' up lead  by the NCO declaring the danger is over.
What happened before the cutscene was a supplydrop which may or may not get caught in NME surprise attack, so when the possible NME is cleared the NCO says its ok. let's get our gear...

So that delay thingy has the disadvantage that the cutscene might 'pop' up just as you were targeting one of the remaining NME or vice versa... So what one would see in the cutscene is the player getting shot  ;)

Of course the delay may decrease the odds of that happening but if there's 'a way of the knowsAbout' I'd prefer that...

'No rest for the patrons'   ;D
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A Trigger related question...
« Reply #6 on: 09 Jan 2004, 11:20:12 »
Yup, see what you mean.   I don't know how knowsabout works on a human player, but a rough idea of what you want is

Activation:   East present
Condition:    (count thislist < 3) and ("player knowsabout _x < 1" count thislist == count thislist)
On activation:    "_x setdammage 1" forEach units thislist

Syntax totally unguaranteed, you'll probably have to play with it a little.   It's good practice to make your player (and often his squad) setcaptive true at the start of a cutscene and setcaptive falst at the end.   Reduces the chance of  ... accidents.
Plenty of reviewed ArmA missions for you to play

Quid Novi

  • Guest
Re:A Trigger related question...
« Reply #7 on: 09 Jan 2004, 12:52:07 »
we're slowly getting there mac ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #8 on: 09 Jan 2004, 18:03:09 »
Quote
Yup, see what you mean.  I don't know how knowsabout works on a human player

It actually works... I thought that it wouldn't but went and tested it ...
player + NME helo (on the ground...)

Don't work for the player unit without the mouse right click, if the guy was right next to the chopper staring at it, knowsAbout was 0 but once right clicked it was jumped to 4...
The players leaders knowsAbout is relevant to the players knowsabout and if the leader himself does not see the chopper and the player does, but does not right click the helo the leaders knowsAbout stays at 0...

But back to my prob.  :D

Quote
(count thislist < 3) and ("player knowsabout _x < 1" count thislist == count thislist)

If you read my orig. post you'd see that something similar already tested, but tested this anyway...
No help I'm afraid  :( ... The trigger was set of but by the first varib getting 'the truth' but that latter had no effect... (tested with variants...)

When tested with "(leader group player) knowsAbout _x < 1" count thisList > 0 the trigger wouldn't go off... (edited a typo on this in the orig. post... It had no < 1 after the _x  :-[)

And that I want the leader of players unit NOT the player to have the knowsAbout value thingy hassle something...  :P

How would i make a hint format loop with this so I could monitor the leaders knowsAbout? I know how to make it when there's a specific dude to knowABout but when it goes to _x...  ???

Quote
It's good practice to make your player (and often his squad) setcaptive true at the start of a cutscene and setcaptive falst at the end.  Reduces the chance of  ... accidents.
'Well, now I feel like a f*****g *****le...' just to quote Jack Nicholson...  >:(  :D
I have never even thought of this...

But anyway in this case it won't help since then the cutscene might begin with the player and the NME staring at each other and it would create some uncomfort for the player and some unwanted dramatics  :P

Then again, like I said earlier, if this gets too 'kinky' I just have to make this without the knowsAbout...  :(
« Last Edit: 09 Jan 2004, 18:09:43 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:A Trigger related question...
« Reply #9 on: 10 Jan 2004, 01:22:34 »
It would be more complicated if you didn't know the number of loons, but for testing purposes you do know because you placed them somewhere where knowsabout would be real low .... like on an outlying island somewhere.

#loop

~4

hint format (no I can never remember the syntax which is why I wrote it down in the online version of the command ref  ;D) ["loon1 %1\nloon2 %2\nloon3 %3", leader grp1 knowsabout loon1, leader grp1 knowsabout loon2, leader grp1 knowsabout loon3]

goto "loop"

I think you have all the tools to do what you want now.   It's just a question of playing with it till it works.

For testing purposes you could use > rather than <, preceded with a reveal command so that you know that everybody knows everything.
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #10 on: 10 Jan 2004, 16:47:13 »
I think the thing I was after works sort off maybe... I used it like this:

Code: [Select]
(count thisList) < 3 "(leader group player) knowsAbout _x < 0.5" count thisList >= 0
Don't know if this works the way it should...  :-\
I don't even know what the heck that knowsAbout line does anymore :D
Getting waayy too confused...  :P

And didn't find any way to make that "(leader group player) knowsAbout _x < 0.5" count thisList >= 0 to a string or whatever to implement it in the hint format thingy to check what it returns...

EDIT:
And may I introduce you my other problem ATM... :tomato:

I have a trigger which is set off if the player is NOT in it... Hence this would be set off if the player got into a vehicle...
The vehicle player does fine if you enter the vehicle as driver, gunner or commander but if you get in as cargo the trigger goes off...

Is this (another) OFP bug or am I missing something...?

Oh, and the trigger covers the whole mission area so it can not be any specific vehicle, ANY of the vehicles in the trigger area should be enterable without the trigger going off...
« Last Edit: 10 Jan 2004, 17:19:37 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:A Trigger related question...
« Reply #11 on: 10 Jan 2004, 19:14:16 »
@ ur newest prob

try grouping da player 2 da triger nd use vehicle not present tel me if it work (i wud have tested it if ma OFP was workin but its not  :'()

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #12 on: 10 Jan 2004, 23:16:16 »
try grouping da player 2 da triger nd use vehicle not present
:o
And it worked...
Seized using that group thing 'cause it feels so 'unprofessional'  ;D :D :P
Maybe I'm the unprofesional one... ::)

Thanks...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:A Trigger related question...
« Reply #13 on: 10 Jan 2004, 23:31:06 »
kool ;D ;)

im a pro ;) nd u r 2 ;D - but i once got into da OFP god (realy - som1 told me dat im his OFP god  8)  :P  ::))

lol

ill think bout ur oder Q tomoz - cuz i got ma OFP workin  8)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:A Trigger related question...
« Reply #14 on: 11 Jan 2004, 01:19:31 »
Quote
cuz i got ma OFP workin
:thumbsup:


 ;D Well who wouldn't wanna be a god... You'd get to boss everyone around and had to answer to none...  :D
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.