![]() |
|
Detecting ships - Printable Version +- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk) +-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html) +--- Forum: Help and Support (https://teamscm.co.uk/forum-8.html) +--- Thread: Detecting ships (/thread-1046.html) |
Detecting ships - [HUN-BA]levente20000 - 29-06-2015 What are you using for detecting ship cores? I've tried target finder, it finds the target but if i wire the vector of the target to the weapons it just fires on the ground. Thanks in advance! RE: Detecting ships - Nova Viper Dwagon - 29-06-2015 Ah I have an E2 that finds players core, here ill paste it Just type !target "player name" for exsample !target nova, and it will target me, my core and my core pos for old weapons, Just real simple nothing too fancy =========================================================== @name Simple Targeting Computer @inputs @outputs Core:entity CoreVec:vector Player:entity @persist @trigger runOnChat(1) interval(250) S = owner():lastSaid():lower():explode(" ") if(S tring(1)=="!target"){Core = noentity(),findClearBlackList(),findClearWhiteList()if(S tring(2)!=""){TempPlayer = findPlayerByName(S tring(2)) if(TempPlayer:isPlayer()){ Player = TempPlayer}} findIncludePlayerProps(Player) findByClass("ship_core") Core = find() } if(S tring(1)=="!clear"){Player = noentity(), Core = noentity()}CoreVec = Core:pos() RE: Detecting ships - [HUN-BA]levente20000 - 29-06-2015 Thanks for this i will study it carefully! I don't like using others chips so i will make my own!
RE: Detecting ships - Grizzle Bizzle - 29-06-2015 (29-06-2015, 05:50 PM)[HUN-BA]levente20000 Wrote: What are you using for detecting ship cores? I've tried target finder, it finds the target but if i wire the vector of the target to the weapons it just fires on the ground. Thanks in advance!Ok best bet for targeting certain objects is using e2 or starfall, as i know allready not sure about starfall though ill check in a moment though, there are some chips out there where people have allready used targeting certain objects so if you want to have a look at there format as well as what im about to say it may help. ill go over e2 as im guessing that will be the best to start at. Ok so first of you will need to set up an array of different targets such as the ships core, so first in your e2 your going to want to start an array with ship_core as the entity then throughout your e2 you can pull it up with the entity value of whatever you set it to like Core=Ship["ship_core",entity] then is basicly Core:pos() which will give you your vector of where the ship core is. That was a bit rushed sorry. shout out when your online then ill show you. RE: Detecting ships - [HUN-BA]levente20000 - 29-06-2015 Ok I'll try to make a chip when I go online and if I can't make one I will speak to you. Thanks for the help!
RE: Detecting ships - Nova Viper Dwagon - 29-06-2015 (29-06-2015, 06:16 PM)james gratrix Wrote:(29-06-2015, 05:50 PM)[HUN-BA]levente20000 Wrote: What are you using for detecting ship cores? I've tried target finder, it finds the target but if i wire the vector of the target to the weapons it just fires on the ground. Thanks in advance!Ok best bet for targeting certain objects is using e2 or starfall, as i know allready not sure about starfall though ill check in a moment though, there are some chips out there where people have allready used targeting certain objects so if you want to have a look at there format as well as what im about to say it may help. Starfall is all well and good but its advance and you need to maintain it, E2 in all my years of TSCM i have never had to maintain any of it XD Why complicate targeting some ones core, Unless your useing a screen that is... then you want to use starfall for its detail RE: Detecting ships - LocInt - 29-06-2015 (29-06-2015, 06:40 PM)Nova Viper Dwagon Wrote:(29-06-2015, 06:16 PM)james gratrix Wrote:(29-06-2015, 05:50 PM)[HUN-BA]levente20000 Wrote: What are you using for detecting ship cores? I've tried target finder, it finds the target but if i wire the vector of the target to the weapons it just fires on the ground. Thanks in advance!Ok best bet for targeting certain objects is using e2 or starfall, as i know allready not sure about starfall though ill check in a moment though, there are some chips out there where people have allready used targeting certain objects so if you want to have a look at there format as well as what im about to say it may help. Well its actually much easier to find stuff in Starfall than E2. Code: Cores = find.byClass( "ship_core", function( Ent ) return Ent:owner() == ents.owner() end )RE: Detecting ships - Nova Viper Dwagon - 29-06-2015 (29-06-2015, 06:47 PM)LocInt Wrote: Well its actually much easier to find stuff in Starfall than E2. i understood that... i may try starfall again |