OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPfreak on 10 Dec 2005, 23:57:33

Title: Checking for a specific unit? (e.g. T72)
Post by: OFPfreak 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.
Title: Re:Checking for a specific unit? (e.g. T72)
Post by: Pilot on 11 Dec 2005, 02:46:13
Use this to check for the type:
typeof _unit=="WhateverVehicleYouAreCheckingFor"

-Pilot
Title: Re:Checking for a specific unit? (e.g. T72)
Post by: Triggerhappy on 12 Dec 2005, 04:35:36
try this:
Code: [Select]
hint format ["The vehicle is a %1",typeof _carname]
perhaps pilot misread? ;D
Title: Re:Checking for a specific unit? (e.g. T72)
Post by: Pilot 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*
Title: Re:Checking for a specific unit? (e.g. T72)
Post by: Triggerhappy on 12 Dec 2005, 23:11:21
hehe :P
Title: Re:Checking for a specific unit? (e.g. T72)
Post by: OFPfreak 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).