I'm working on a teleport script for fieldofdeath that will prevent players holding the ctf flag from using it. What I need is a way to detect the flag. I tried this as part of my if statement for player zero:
(and
(= (volume_test_object redtelebox (list_get (players) 0)) true)
(= (unit_has_weapon (unit (list_get (players) 0)) flag) false)
) ;; End (and
It checks to see if they are in the trigger volume then checks to see if they are holding the flag. The teleport code will only get run if unit_has_weapon statement returns false.
My only problem is this error:
Quote: 08.31.07 00:40:50 [red_tele line 5] this is not a reference to a object_definition tag.: flag) false)
Aparently the flag isn't an object reference despite having a flag.flag tag and a flag.weapon tag in the weapons tag folder...
This should have worked but I'm not sure anymore if the flag even has a valid object_reference name now :/
What are my options here?