bool A_FireFragment(Class<Actor> projectile, double angleRange = 360, double vrange = 90, int numRays = 60, double distance = 512)
{
for (int i = 0; i < numRays; i++)
{
FTranslatedLineTarget t;
double an = angleRange/numRays * i;
double pitch = self.AimLineAttack(an, distance, t, vrange);
if ...
Search found 8 matches
- Mon Nov 20, 2023 1:20 am
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
- Sat Nov 18, 2023 3:07 am
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
Re: Is there any hitscan laserbeam-like function that has autoaim?
I noticed that the aimed missiles seem to go to the enemies' feet. Is there any way to make them aim for their centers?
- Mon Nov 13, 2023 3:32 pm
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
Re: Is there any hitscan laserbeam-like function that has autoaim?
Thank you! That worked well.
- Mon Nov 13, 2023 1:37 pm
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
Re: Is there any hitscan laserbeam-like function that has autoaim?
I am using AimLineAttack from a primary projectile to pick out a target to shoot at during flight. I want to use A_SpawnProjectile to shoot another projectile at it. How can I take the actor returned in the FTranslatedLineTarget (linetarget) and pass it into the target parameter for A ...
- Sun Nov 12, 2023 7:44 pm
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
Re: Is there any hitscan laserbeam-like function that has autoaim?
For AimLineAttack, are you saying that we have to set the horizontal angle, but it should aim vertically toward any shootable actor? If that is the case, then technically A_BFGSpray may miss a few enemies within the angle range if they stand between the rays. But if there are a sufficient number of ...
- Sun Nov 12, 2023 5:35 pm
- Forum: Scripting
- Topic: Is there any hitscan laserbeam-like function that has autoaim?
- Replies: 16
- Views: 1659
Re: Is there any hitscan laserbeam-like function that has autoaim?
There is no wiki page for AimLineAttack. Can someone write one please? Is it like a raycast where it points in one direction and returns info about the first thing that it hits? Or does it scan a range and find an angle to something in that area?
- Sun Nov 12, 2023 5:30 pm
- Forum: Scripting
- Topic: ZScript: Actor pointers involving master/minion relationships and damage sources
- Replies: 2
- Views: 346
Re: ZScript: Actor pointers involving master/minion relationships and damage sources
Thank you. I'm going to look into these options and see if I can get it to work.
- Sun Nov 12, 2023 5:59 am
- Forum: Scripting
- Topic: ZScript: Actor pointers involving master/minion relationships and damage sources
- Replies: 2
- Views: 346
ZScript: Actor pointers involving master/minion relationships and damage sources
I'm trying to make it so that when an enemy is damaged, it does something to the source of the damage (using a virtual function like TakeSpecialDamage). Usually, this is a player or another enemy. This has been working for basic situations like a player-launched projectile that hits the monster. The ...