Jump to content
Sign in to follow this  
VillageRaper

problem - "old" setVehicleVarName "new" -> trigger: alive new -> doesn't work

Recommended Posts

Hi, I have a problem with some script.

If I create an object like helicopter and I name it "aircraft1", then trigger (condition: alive aircraft1), (do:hint "alive aircraft1") works perfectly.

However when I create nameless object or object with a different name, and later I change its name to "aircraft1" by using (object setVehicleVarName "aircraft1") the name changes to the new but trigger alive aircraft1 doesn't work.

Also when I name my helicopter "aircraft1" and later I change its name to a diffferent by using setVehicleVarName the script works like the name was still "aircraft1".

Do you know the solution?

Update#1

I've found some solution:

call compile format["%1 = this", "aircraft1"];

Edited by VillageRaper

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×