Home   Help Search Login Register  

Author Topic: litle AND problem  (Read 1434 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
litle AND problem
« on: 25 Jun 2005, 00:54:35 »
Since I haven't been playing OFP for about 2 months, I forgot this litle tiny script thing.
I've been trying to create 2 triggers. The 1st one worked but the 2nd didn't.

type: end1
condition: car1 (player)

type: loose
condition: car2 ; car3 ; car4 ; car5; car6

Here are some others I tried for trigger 2

type: loose
condition: car2 AND car3 AND car4 AND car5 AND car6

type: loose
condition: car2 OR car3 OR car4 OR car5 OR car6

please help!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:litle AND problem
« Reply #1 on: 25 Jun 2005, 01:10:18 »
Are we to asume that the mission ends and the player wins if the booleen variable car1 is true and the mission ends and is lost if car 2.....car3 etc. are true?  Maybe instead try making the mission lost if car1 is not true:

type: loose
condition: not car1

OH, and what is the significance of "(player)" next to car1?  That is not any valid use of syntax that I know of.

type: end1
condition: car1   ? (player) ?




Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #2 on: 25 Jun 2005, 03:29:10 »
It was actually without the (player) but it was just to give people a hint that that name is the player's name. Thanks for you tip!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #3 on: 25 Jun 2005, 03:31:21 »
uh oh! the "not player" doesn't work either!

both the things I tried and the "not player" all say something like:

Error not/AND/OR, error type is object, expected bool.

And no I did not use not/and/or together. I used each word seperatly!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:litle AND problem
« Reply #4 on: 25 Jun 2005, 07:48:33 »
are 'car1', 'car2' etc. variables, or are they objects?

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #5 on: 25 Jun 2005, 08:24:26 »
objects..

P.S. changing flashoint to flashpoint ;)! No wait... I've done it so it should be right now ;D!!!!
« Last Edit: 25 Jun 2005, 08:25:38 by OFPfreak »
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:litle AND problem
« Reply #6 on: 25 Jun 2005, 08:30:52 »
that's why there's an error. condition fields in triggers check for boolean variables, not objects.

what are you trying to do with the trigger? what should trigger the end?

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #7 on: 25 Jun 2005, 08:40:49 »
For my racing modification I'm trying to make the rivals loose the game if they finish. I got 1 trigger for the player to win and I want 1 for all of the other cars to loose. E.G. If I just have a trigger for 1 rival and another rival crosses the finish line I wouldn't loose.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:litle AND problem
« Reply #8 on: 25 Jun 2005, 10:47:34 »
alongside the first trigger which will make the player win, the second trigger should fire whenever anyone who is not the player enters. thus, make the second trigger activate on west present (or whatever side the rivals are on), and the condition field should read

Code: [Select]
this and (not ((thislist select 0) == player))
that is tested and works.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #9 on: 25 Jun 2005, 12:40:18 »
um..
my rivals are on the civillian side as well. Will this work?
So um... I just copy this horrifiying strange code into my trigger?
I'll try.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:litle AND problem
« Reply #10 on: 26 Jun 2005, 09:08:06 »
im going to try out the command "&&" now! This will hopefully work!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage