Home   Help Search Login Register  

Author Topic: Checking for a specific unit? (e.g. T72)  (Read 704 times)

0 Members and 1 Guest are viewing this topic.

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Checking for a specific unit? (e.g. T72)
« on: 10 Dec 2005, 23:57:33 »
I know it's possible to check for a specific unit somehow, so I want to make it with my detailed checking script that if the player scrolls trough the information of car1 they can see what type of unit that is.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline Pilot

  • Contributing Member
  • **
Re:Checking for a specific unit? (e.g. T72)
« Reply #1 on: 11 Dec 2005, 02:46:13 »
Use this to check for the type:
typeof _unit=="WhateverVehicleYouAreCheckingFor"

-Pilot

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Checking for a specific unit? (e.g. T72)
« Reply #2 on: 12 Dec 2005, 04:35:36 »
try this:
Code: [Select]
hint format ["The vehicle is a %1",typeof _carname]
perhaps pilot misread? ;D

Offline Pilot

  • Contributing Member
  • **
Re:Checking for a specific unit? (e.g. T72)
« Reply #3 on: 12 Dec 2005, 05:05:58 »
I don't think so...maybe :P

I was just giving him a method he could use to incorporate into his script.  I wasn't sure if all OFPfreak wanted was a simple hint or something more in depth.

-Pilot

EDIT:
Hmph, the more I think about it the more I think you are right, Triggerhappy. >:( ;D  I was thinking OFPfreak wanted to incorporate this into some kind of dialog, but even in that case your method is right.
*grumble*
« Last Edit: 12 Dec 2005, 05:17:09 by Pilot »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Checking for a specific unit? (e.g. T72)
« Reply #4 on: 12 Dec 2005, 23:11:21 »
hehe :P

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Checking for a specific unit? (e.g. T72)
« Reply #5 on: 12 Dec 2005, 23:57:58 »
Ok thanks for that. No it's not a dialog. It's a HintC message (yes i know its cadet only).
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage