Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: deactivating mines  (Read 2363 times)

0 Members and 1 Guest are viewing this topic.

magnar

  • Guest
deactivating mines
« on: 03 Jul 2005, 08:59:28 »
  I have looked for information on this, but have come up empty.  How can you, via trigger or script, whatever is easier, have an objective met when 5 mines are deactivated.  I tried the   not alive way, naming mines M1 through M5, but that doesnt work.  Any help would be greatly appreciated. ??? :-\

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:deactivating mines
« Reply #1 on: 03 Jul 2005, 09:12:32 »
Maybe try the "isnull" command? For example:

{isnull _x} count [M1,M2,M3,M4,M5]
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

magnar

  • Guest
Re:deactivating mines
« Reply #2 on: 03 Jul 2005, 09:15:06 »
will try right now.  Thanks

magnar

  • Guest
Re:deactivating mines
« Reply #3 on: 03 Jul 2005, 09:18:48 »
oops.  Sorry, does this go in the cindition field of the trigger, or is it used in a script?  Noob to scripting here, my bad!

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:deactivating mines
« Reply #4 on: 03 Jul 2005, 09:19:42 »
That would be the condition field of a trigger.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

magnar

  • Guest
Re:deactivating mines
« Reply #5 on: 03 Jul 2005, 09:22:50 »
with this in condition field of trigger, am getting the TYPE NUMBER, EXPECTED BOOL error.......?
 

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:deactivating mines
« Reply #6 on: 03 Jul 2005, 09:28:38 »
Whoops, I'm sorry, I didn't finish! It should look like this:

({isnull _x} count [M1,M2,M3,M4,M5]) == 0
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

magnar

  • Guest
Re:deactivating mines
« Reply #7 on: 03 Jul 2005, 09:35:50 »
thanks again ;D

magnar

  • Guest
Re:deactivating mines
« Reply #8 on: 03 Jul 2005, 09:38:31 »
({isnull _x} count [M1,M2,M3,M4,M5]) == 0  ; this makes the trigger go off but none of the mines were deactiviated yet?  hmmmmmm?

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:deactivating mines
« Reply #9 on: 03 Jul 2005, 09:40:00 »
Damn it... I need to go to sleep.

({! isnull _x} count [M1,M2,M3,M4,M5]) == 0
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

magnar

  • Guest
Re:deactivating mines
« Reply #10 on: 03 Jul 2005, 09:46:13 »
unfortunately same result.  It seems as if the mines are not responding to the is null command.  I really appreciate your help, and hope you can sleep soon!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:deactivating mines
« Reply #11 on: 03 Jul 2005, 10:04:30 »
This is really odd.  I placed a mine on the map called m1 and then I set up the following radio hint

hint format["XLocation = %1\nisNull = %2\nAlive = %3",getPos m1 select 0,isNull m1,alive m1]

And it seems that as far as the mine is concerned its location, its isNull status and its alive status are all undefined.  If I call something else m1 then the hint gives the correct values.

It seems there is some other property of the mine that needs to be checked - or maybe it is not possible.

magnar

  • Guest
Re:deactivating mines
« Reply #12 on: 03 Jul 2005, 10:09:42 »
I think you are right, its status is undefined, as least as far as those two commands are concerned.  Ive been looking in the command ref, but I dont see anything else (with my limited knowledge) that would serve to change its status.  Maybe its not possible, unless someone has a different suggestion?  Thanks for your help with this............ ::)

qqqqqq

  • Guest
Re:deactivating mines
« Reply #13 on: 03 Jul 2005, 10:35:26 »
Mines are not proper objects.   Most scripting commands do not apply to them.    magnar, give us more details or rethink your mission.   A complex and sophisticated workaround will probably be required.    AFAIK the only people who have managed to do anything like this are macguba and Sui.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:deactivating mines
« Reply #14 on: 03 Jul 2005, 10:35:29 »
It is as if you can't give mines a name.

I am going out now and so can't test it, but could you get the mine by using nearestObject command and then check its status?

It is a bit fiddly otherwise I would do it now.