fireair 0 Posted September 6, 2017 Share Posted September 6, 2017 im trying to make a program that launches a defensetech missile but i am inexperienced whats wrong with my code? Quote Link to post Share on other sites
0 fireair 0 Posted September 6, 2017 Author Share Posted September 6, 2017 never mind i figured it out Quote Link to post Share on other sites
0 Fingercomp 37 Posted September 7, 2017 Share Posted September 7, 2017 You don't need to use component.invoke here. It's a quite rarely used function since there are better alternatives. First, component.<component type>.<method>. E.g., component.tile_defense_machine_launcherscreen_name.launch(). This is what you should use if you only have a single component of some type. local component = require("component") local launcher = component.tile_defense_machine_launcherscreen_name launcher.launch() Second, component.proxy(address). Use it if there are several components of the same time, and you need to operate with a specific one. An address of the component should be passed to the function. local component = require("component") -- the address of the component, use an analyzer to get it local componentAddress = "1234567890ab-1234-1234-1234-12345678" local launcher = component.proxy(componentAddress) launcher.launch() Quote Link to post Share on other sites
0 Nexarius 18 Posted September 8, 2017 Share Posted September 8, 2017 local component = require("component") for k in component.list("tile_defense_machine_launcherscreen_name") do component.proxy(k).launch() end You can use this if you have multiple launchers and want to activate all of them. Quote Link to post Share on other sites
0 fireair 0 Posted September 10, 2017 Author Share Posted September 10, 2017 thanks much guys i really appreciate it Quote Link to post Share on other sites
im trying to make a program that launches a defensetech missile but i am inexperienced whats wrong with my code?
Link to post
Share on other sites