Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Wed May 22, 2013 1:06 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: monster_turret
PostPosted: Sat Sep 25, 2010 6:00 pm 
Offline
The first 10 posts have been the best...

Joined: Thu Sep 23, 2010 3:44 pm
Posts: 15
hi guys,

how to tell a turret to instantly target and shoot since an enemy (even monsters) walk in range / sight ? i played with the spawnargs, neither auto_target, triggering it, .becomeAggressive(), etc. worked for me. somebody can help me?

i just want a turret in a corner that fires on evrything thats not in his team.

thx for help


Top
 Profile E-mail  
 
 Post subject: Re: monster_turret
PostPosted: Mon Sep 27, 2010 3:17 pm 
Online
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 7073
Location: Here, not there.
So did you trigger it to activate it or just set it up to be triggered?

_________________
Fuzzy Logic Inc
PAINTBALL DOOM 3!!!!
Check out my Q2 server! q2server.fuzzylogicinc.com :D
Doom 3, Paintball! d3server.fuzzylogicinc.com


Top
 Profile E-mail  
 
 Post subject: Re: monster_turret
PostPosted: Mon Sep 27, 2010 4:32 pm 
Offline
The first 10 posts have been the best...

Joined: Thu Sep 23, 2010 3:44 pm
Posts: 15
i tried trigger flag 0 and 1. i trigger it all time via sys.trigger. no difference if u trigger it with enemies around or not. auto_target 1 didnt help anyway. it only starts shooting if it gets attacked.


Top
 Profile E-mail  
 
 Post subject: Re: monster_turret
PostPosted: Mon Sep 27, 2010 10:55 pm 
Offline
fired 300 rounds

Joined: Tue Oct 19, 2004 8:04 am
Posts: 356
The SDK is again the answer to your question - although I don't have a great answer for you yet.... do you have any experience in C++? If so it'd definitely be worth you downloading the code, building it, and adding some debug info so you can figure out exactly what is happening in your case.

The possibilities I've found so far, in increasing order of likeliness:

  • The ignored enemies have "notarget" = "1" in it's spawnArgs - this causes idAI::ReactTo to ignore them until they have been attacked. I suspect this isn't your issue though since the default notarget seems to be "0".
  • your turret is "dormant". It looks like AI's are usually dormant until they're woken up by a player (not monster) being near (based on idEntity::DoDormantTests). Try setting "neverDormant" to "1" in the spawnArgs.
  • There's something else that I've missed that would cause it to ignore it's enemies. Using C++ I'd debug this by putting a breakpoint / logging into rvMonsterTurret::State_Combat and see if it's selecting an enemy. If it isn't, then debug into CheckForEnemy to figure out why that isn't finding one when you think there should be.


Top
 Profile  
 
 Post subject: Re: monster_turret
PostPosted: Tue Sep 28, 2010 6:08 pm 
Offline
The first 10 posts have been the best...

Joined: Thu Sep 23, 2010 3:44 pm
Posts: 15
thanks for your answer, i fixed my prob few secs ago. seemed to be something messed up with the setup. thanks anyway for taking care of it. im well experienced in c/c++ but its long time ago. ive used java the last few years for my job and want to get into it again.

i already met some of those methods as i changed the ai sys a bit. but i have to work on the turrets anyway, so thanks for spoinling me some good points in the code.


Top
 Profile E-mail  
 
 Post subject: Re: monster_turret
PostPosted: Tue Sep 28, 2010 10:36 pm 
Offline
fired 300 rounds

Joined: Tue Oct 19, 2004 8:04 am
Posts: 356
Glad you've got it sorted. some people who stick to scripting don't have experience in c++ and struggle to figure things out, but running it up in a debugger with a few well placed breakpoints tends to help figure out what is going on far quicker than anything else


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group