If we want to help how do we???
Attacking codes... how should it attack? Sorry, but I really don't have the time to read through the whole thread.
Pick a target from an array, determine which body prop is closest to and can see them, hurl it violently at them with enough force to kill them, then return it to it's rightful position in the lot.
The final stroke is easiest, by inserting an array lookup into the body prop positioning code we can have an array with values of 0 (true) or 1 (false) for each body prop, which the applyForce vector for the positioning is multiplied for. In which case, the attack code can simply and temporarily switch the value for that given body prop to 0 and then back to 1 when it's finished.
Basically:X ensures that the prop is picked up again by the drone, that the prop is able to achieve as much velocity as possible to kill the target (rather than fizzing about around them near-harmlessly), and very importantly for DroneVPlayer (DVP?) play it means it's range is limited, so that it actually has reason to approach targets rather than whacking them from across the map.
- Find nearest target
- Check which props have passed X+delay array entry, so are useable again
- Check which of those body props can see target (rangerOffset can do this, drawing a line from the prop to the target)
- From the props that can see it, which is closest?
- Turn positioning array entry for prop to 0, set delay array entry for prop to current server tick
- Hurl prop towards target with extreme force
- After X ticks, update delay array entry, return positioning array entry to 1, returning the prop to it's rightful location
Last edited by Lyinginbedmon; 10-24-2009 at 01:24 PM.
This would be too difficult for me though ^^.
I mean, I could maybe make something check line of fire, distances etc, but I got lost on the arrays and such.
How would it know what should be in the array? Is it it's body parts? if so, then wouldn't it fall apart? especially if it targets to many players.
If two targets appear, and two props are sent, if one of the props is covering the other, would they get back in the same order?
The body props array is what should be used, it's output by another chip, so the "thwack" chip just needs to have it as an input. It also needs an array of the targets, which is output by the entity(N) discovery chip, so that's another input. What the Thwack chip itself needs to output is the positioning reference array.
Ordinarily, it's not a good idea to put rangerOffsets() into while() loops, but since there's only a small handful of body props that shouldn't be a problem.
One loop runs to find the target nearest to the base vector that all the props are positioned around, when that finishes it triggers another loop to determine which body prop should be fired, then fires it.
There's nothing holding the drone together besides applyForce, so it loses nothing if a body part isn't in position. If anything, having all the body props in different locations is almost an advantage because it makes them harder to target. Attacking many targets at once would leave the chips themselves alone in no man's land, but that's not something we can really avoid without making the drone more vulnerable to group attacks.
Because of the delay array, they'd return in the same sequence they were originally thrown in. This shouldn't be a problem.
Last edited by Lyinginbedmon; 10-24-2009 at 02:43 PM.
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
The last part confuses me. what X+delay array?
so, I am given the targets (players) and my ammo (body parts).
With this I should find the closest player, and then send the prop closest to him , into his body (Targetos()+vec(0,0,20)). But only if the line of sight is clear?
What would stop it from homing in on the target? If it could home into it, then why use line of sight?
Bookmarks