Turret's, how about...

New releases and general discussions.

Post » Thu Apr 09, 2009 9:29 pm

Another suggestion, I wanted to bounce off everyone before I dirty up the tracker.
Currently the turret behavior does not take into account whats in between it and the target.
So if for example you have a wall in between the target and the turret, the turret will still try to shoot through the wall. Really there's no good way to avoid this, other than making up a bunch of events to check and see everything that's there, or have a collision event for the bullet.
I know sometimes this is actually what you want, but for when you don't, Id like to suggest something like a "Shoot through solids" check box.

Also another couple small suggestion's for actions dealing with the turret behavior, would be a "Is turning" condition, a "Is reloading" condition, and "On new target acquired".

Reloading meaning it has a target, and has fired, and is waiting for the next shoot.
Useful for things like if it receives damage in the wait period.

Then on new target acquired meaning its switched targets, but the old target is still in range.
I'm not sure about a condition on this one, perhaps another preferences check box, like "Keep target until out of range"
Image Image
B
161
S
48
G
90
Posts: 7,354
Reputation: 66,763

Post » Thu Apr 09, 2009 10:48 pm

To have a turret aim to the last place the target was seen you could keep a proxy object that would represent where the object was last seen (or where the turret expects it to be next).
You could have a line-of-sight object and check for collision with solids. If colliding (or out of range), do not update the proxy object.

This falls a bit into AI, as you could move the proxy object to where you expect the object to appear. You can also have this proxy object move in front of the real object so the turret shoots bullets that will intercept the target instead of landing behind it.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Apr 10, 2009 6:52 am

See the thing is there already is a function to follow first in range, but the problem is its quite difficult to get exactly what its picking into something else.

Using a dummie sprite might be doable,but the fact is it would require a lot of labor just to get it to work, and you would almost double the amount of objects used. I believe a simple call to the system compare points would be more plausible, but again you have an issue with what the system will pick, and what the object is picking.... while using follow first in range, and a family.

Now as to avoiding solids.
I did try using line of sight, and the results are a bit better.... need to experiment some more.
Image Image
B
161
S
48
G
90
Posts: 7,354
Reputation: 66,763

Post » Fri Apr 10, 2009 9:00 am

I'd have to say line of sight was the best way to go; we don't really want to have feature overlap, but maybe the two could work together a little better if it can't do what you want.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Mon Apr 13, 2009 4:11 am

[quote="newt":2nkn7zc5]Using a dummie sprite might be doable,but the fact is it would require a lot of labor just to get it to work, and you would almost double the amount of objects used.[/quote:2nkn7zc5]
Just use one single dummy sprite and have each turret spawn an instance for it's own usage :P
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests