News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Tweaking projectiles set to seek targets

Started by VGames, September 24, 2014, 01:41:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VGames

I've got this secondary attack for the BFG in my Perfected Doom 3 mod that releases big green orbs that move very slowly and basically act as turrets that attack monsters using the laser currents that flow from the normal BFG projectile as it flies across a room. Anyways I noticed that the orbs will only attack monsters that were already present when the turret orb was launched. If the turret orb has been launched and then a monster appears or spawns in the orb will not attack them. How can I fix this problem. I'm sure it has something to do with the seeking code for projectiles. Because my primary attack for the BFG releases extra small orbs along with the primary projectile that vary in number depending on how much u charged up the BFG before firing. And these smaller orbs wont seek an enemy unless you were aiming right at somebody when u fired the gun. I hope u guys understand what I'm saying and asking.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

my solution (aka the ultra hacky way): spawn actual monsters that are acts like turrets and attack.  Then they have their own AI.  That's what it needs, it's own AI, and 99% of the AI in D3 does a basic "find something to kill and kill it" routine.

VGames

I like your thinking. So make a monster that looks and acts like my projectiles? I'll see if I can pull this off. I'm sure I'll be back with more questions.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Ok it's been a while since I posted in this thread but I did a workaround on this Orb that kills baddies with the same energy beams found in the BFG primary projectile. The way I did it was made the original orb create another orb after 1 second and then that second orb makes another orb after 1 second and then another orb and another orb are made until 15 seconds total passes resulting in no more orbs. They work as I hoped constantly searching for any new baddies that come around after the previous orb was created. This way they always attack the newest enemy while looking like the same orb that you originally fired.

Here's the problem: the orbs that follow after the original orb you launched from the BFG will attack you too. They no longer realize that u were the original creator of the very first orb. So is there any way I can fix this and not allow these orbs that come after the originally launched orb attack you?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

In single player the player is $player1, right?  Could you do a check to see if the target is the player & then skip to the next target?

VGames

Not sure how to do that. Maybe if I add $player1. to the front of the fireprojectile commands in the scripts for the orb projectiles then the orbs won't attack the player.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

VGames

Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500