Team Spartan Cookies & Milk Forums
ship_cannon problems : bug ? - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: ship_cannon problems : bug ? (/thread-1432.html)



ship_cannon problems : bug ? - Yuri6037 - 28-10-2015

Hey again Person, I have a problem when I use getWirelink() on a ship_cannon at script startup (to store on a table) and then on chat listen I get the wirelink stored in table and I do v["Fire"] = 1 on it however the weapon seams to be ignoring the input set using starfall but handles input set using normal wiremod.

The problem does not appear on weapons that have a vector target by wiremod...

I hope you can do something.

Thanks by advance,
Yuri6037


RE: ship_cannon problems : bug ? - SuperPlayer - 28-10-2015

I am doing the same thing in my code and it just works fine. This is the code i am using, maybe it helps you to identify an error in yours:

for i,v in pairs(Cannons) do--Note that Cannons is an array of entities
Can = Cannons[i]:getWirelink()
Can["Fire"] = 1
end
Also if you could give the loop it would help us to help you. I know you dont want to give out "secrets", but there is really nothing secret on a for loop.Big Grin

SuperPlayer


RE: ship_cannon problems : bug ? - Yuri6037 - 28-10-2015

(28-10-2015, 03:59 PM)SuperPlayer Wrote: I am doing the same thing in my code and it just works fine. This is the code i am using, maybe it helps you to identify an error in yours:

for i,v in pairs(Cannons) do--Note that Cannons is an array of entities
Can = Cannons[i]:getWirelink()
Can["Fire"] = 1
end
Also if you could give the loop it would help us to help you. I know you dont want to give out "secrets", but there is really nothing secret on a for loop.Big Grin

SuperPlayer

It's not exactly what I'm doing. I stored the wirelink at the script startup. I'm not re-calling the getWirelink() method. I stored it once and then I use it when nessessary.


RE: ship_cannon problems : bug ? - Person8880 - 28-10-2015

You'll have to post the relevant parts of the code. There's nothing special about the wirelink to a ship cannon.


RE: ship_cannon problems : bug ? - Yuri6037 - 28-10-2015

Problem solved...
Sorry for annoyance...