Quote: --- Original message by: Dark NinjaI was messing around while making maps, and figured out how to create an Arbiter style cloak-kinda. Before I go into it, I did search, and I haven't seen any topics about this. This only works for singleplayer maps. You place a health pack, cloak, etc. and give it a name. Check "not placed automatically". Then you script.
(script startup Cloak
(begin
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(object_create cloak)
(objects_attach (unit (list_get (players) 0)) "" cloak "")
(objects_detach (unit (list_get (players) 0)) cloak)
(sleep 1650)
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) false))
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(object_create cloak)
(objects_attach (unit (list_get (players) 0)) "" cloak "")
(objects_detach (unit (list_get (players) 0)) cloak)
(sleep 1650)
)
)
With this you cloak, and then wait, I think 10 seconds before using it again. And it only works twice, to make it continuous, make it a script continuous. You can also use the flashlight thing for other purposes, like meleeing if you're a hunter, spawning AI for backup, telling AI to advance with their command list, etc.
Here's one for melee with a hunter
(script continuous Melee
(begin
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(magic_melee_attack)
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) false))
(magic_melee_attack)
)
)
I just wanted to share this with everyone.
Edited by Dark Ninja on Aug 20, 2008 at 10:09 AM