Jump to content

Attach a player to a turret (mini-gun)


DarkLink

Recommended Posts

Okay guys, first I wanna know if this is possible to do?

If you dont know what I am talking about, remember the Zero Mission in single player, you was CJ on a turret (mini-gun) destroying all the airplanes coming from barkley? do you remember?

My question is: is it possible to attach a player to a minigun, change the camera do the minigun, make a cross for aiming and then left mouse to shoot the minigun.

This is very important to me :S

I dont have any clue how to do it.. I know I can make the object (turret), a bind key to enter, than a condition if player is near the turret than he gets attached. But I dont have any idea how to change camera to sync with turret movement, and make the crosshair..

So can you guys give me some help? I dont want the code, just some ideas how to do it, with turret movement.. the crosshair and the shooting.

Thanks alot in advance!!

EDIT: Just one more question, how can I set destroyable objects not to be destroyable? is it possible? I talk about wood objects that players can destroy.. I dont want players to destroy it, is it possible by scripting? thanks.

Link to comment

For the player to move the turrent is easy, when the player right click then you could use the

 setCameraMatrix 

and maybe

setCameraTarget 

then to create a cross hair, use the dx draw

and on player left click, set the cross hair to a new position...

For the boxes, use

setObjectStatic 

Link to comment

Thanks for your reply jay, but I didnt understand much.

for setCameraMatrix with right click, I need to be constant refreshing the position of the mouse on the screen?

and about this

and on player left click, set the cross hair to a new position...

So the cross hair change position when player fire? I dont get it :S

and setObjectStatic, when they get destroyed (use isObjectStatic, if is false then its destroyed, right?) I made them again?

Thanks for your help bro.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...