Distance-aware aiming scripts

Distance-aware aiming scripts

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Distance-aware aiming scripts

Post by KDR_11k »

I think it would be cool if the AimWeaponX function somehow told you how far the target is away. That would allow stuff like having a command tower that when attacking has a piece that looks like a plane swoop down at the target and shoot at it. Unfortunately I can't think of a way to fit this into the current BOS system (unless you can add parameters to an engine-called function at will so AimWeaponX would really have three parameters but the third is ignored when the function definition only lists two).
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Actually, you can do such things, but it involves using several pieces and then doing the trig necessary to return the distance. Complex, and not very much fun, but it is possible. I'd check out zszwg's teleporter code, if I were you :-)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

The trig functions in BOS are pretty limiting, I'd have used the manual approach if sine or cosine was available but I don't think it is.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

Look at zwzsg's code. It's All You Need To Know.
Post Reply

Return to “Feature Requests”