Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Fri Jul 30, 2010 9:58 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: player controlled turrets
PostPosted: Sun Sep 11, 2005 4:47 pm 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 5959
Location: Here, not there.
Has anyone tried to make player controlled turrets? I searched & only found questions/info about the machineguns ones.

I talking about turrets like in UT2K4, Half Life/HL2, etc. I have a few ideas, but if someone already tried I could start where they ended, or at least know what won't work.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 12:14 am 
Offline
"...mostly harmless?!"
User avatar

Joined: Fri Nov 09, 2001 12:00 am
Posts: 5123
Location: UK, York
There's no GUI involved in this type of turret right?

_________________
Modeling and modding tutorials and tips


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 2:13 am 
Offline
Captured the Flag

Joined: Thu Jan 06, 2005 8:56 pm
Posts: 1880
Location: 127.0.0.1
I have no knowledge of any attempts at this, but it sounds relatively simple. Some of the code you need is already in the SDK (for vehicles):

You'd probably have to just have a key to activate the turret, which would bind the player to the turret, and align the viewangles of the player with the view of the turret, and make his fire affect the turret while bound to it.

_________________
Check out Classic Doom 3!
Support OmegaDrive


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 5:25 am 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 5959
Location: Here, not there.
no gui... i don't know anything on how gui's work. :)

I don't want to mod the SDK if I can help it. I don't have any version of MS C++...

But I was hoping someone tried this before, I guess not. :)

I was actuatly thinking of something simular to what you sugested snoop... I was thinking of having it so that when the player walks on a designated area (or in something) it "Activates" the turret. Then the turrent is always aligned with the player's view angles (I could never get objects to bind to players. IF you know how, please post). Basicly, every game frame it would make the turret angle = the player view angle (hack, I know).

the firing thing was what I was having trouble getting a rough idea on how to do. I could
a) make the turret a weapon & when you activate the turret that weapon is put in to your invintory & all others are removed.
b) make the player interact with it somehow. I could put a check in the script that says when you click "fire" it launches a projecticle.

having thr turret bound to the player would be probley the easiest way: I could make it a func_Static & just have that bind to the player when the player "enters" the turret & unbound when you leave (hit a button?)


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Sep 12, 2005 6:44 am 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 5959
Location: Here, not there.
this is a start...

just unzip to your base/maps folder:

http://www.sterlingshield.net/home/stev ... t_test.zip


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 2:33 pm 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 5959
Location: Here, not there.
anyone have an idea on how to make a non-weapon script check "WEAPON_ATTACK"? Doesn't seem to work.

I might end up just makging a new weapon that you (somehow) get when you go into the turrt & it removes when you leave.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 5:37 pm 
Offline
found a secret

Joined: Tue Sep 07, 2004 6:23 pm
Posts: 652
Location: Bracknell UK
if ( $player.getButtons() == 17 ){ will tell you if youve pressed fire or not, i pressume this is what your after.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 7:39 pm 
Offline
Very Senior Forum Poster
User avatar

Joined: Sun May 29, 2005 10:02 pm
Posts: 5959
Location: Here, not there.
yes it is, htanks.

Do all the actions in the game have a number associated with them?


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 9:11 pm 
Offline
found a secret

Joined: Tue Sep 07, 2004 6:23 pm
Posts: 652
Location: Bracknell UK
Quote:
Do all the actions in the game have a number associated with them?

Not sure , try
Code:
void main (){
  while(1){
    sys.print( $player1.getButtons() );
  }
}

and just go through all you buttons see what you get, 16 is default ?( nothing pressed i think ).

Other than that for actor stuff you can do
Code:
void main(){
  while(1){
    sys.print( $player1.getAnimState(#) );
  }
}

where # is 1 or 2 torso,legs respectively. Check ANIM_ defines for other channels. Only trouble with this for you want is that if you were to check for Torso_Fire being sent back off of this you'll see it return every time you check whilst the animation is playing.
Quick usage example
Code:
if($player1.getAnimState(2) == "Legs_Crouched"){
   sys.print("player is crouched\n");           
}                                               


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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