Jump to content

How to build an double gun


Maguh1488
 Share

Recommended Posts

hi ...

i would like to build a topview vertical scrolled spaceshooter..

in my projekt i have add the game area with space skybox , a spaceship as playermodel

this works good so far but now im stuck on the weapon's ...

i would like to add a weapon on the left and right side at the ship, how can i make this ?!?!?

so i need help to build a double gun for an spaceship.

 

is there anybody who can help me ... ?

 

i can attach the source code if needed... for anyone who like to build game's in this style

 

thx

 

Maggi_Maguh

Link to comment
Share on other sites

I dont know if having one gun and settign another as a child and attaching a script to the main one would work. i dont think that would be the solution.

Asus sabertooth 990FX, AMD FX 9590 , Windows 7 Home Premium 64 Bit, 4 HDD's Western Digital Caviar Black set in Raid 0, 16 GB Crucial Ballistix Elite, Asus Radeon R9 270 X 4GB, Corsair CM750M,

Link to comment
Share on other sites

as first ... thank you for your answers. =)

 

yes i have the standard autopistol.lua ...

i think i have to change the bullet creation ?! ... two bullets instead of one and these two in a distance of my choise.

but i'm no lua crack ;) this are my first steps with lua.

i try to change the bullet creation but i only get nil-error....

now i also start experimenting with a turret.lua and bullet.lua script that i have found here in the

Download --> Scripts --> Turret and missile scripts.

 

many thank's rolleyes.gif

Link to comment
Share on other sites

update ... eureka !! =)

 

maybe i got a solution for my problem ...

 

i have add the turrent script and the bullet,

then i have add a flowgraph input function to it (timer disabled.. and only fire if there have an "Fire" input)

then i have add an output function to my ShipPlayerController for the fire button event.

now i can copy and paste so much weapons as i needed ...

only bind the weapons to the player and ..

 

it looks like good ...

 

p.s. Leadwerks rules =) biggrin.png

Link to comment
Share on other sites

Download --> Scripts --> Turret and missile scripts.

This version uses PhysicSetposition and you update the position physics each loop in the program.

I made another version using SetVelociy, so your bullet velocity is constant and just initiated at start.

Both methods have their advantages, like moving the bullet manually with physiSetposition to make any trajectory you want , or SetVelocity when you need a direct streightforward trajectory.

http://www.leadwerks.com/werkspace/files/file/512-turret-v2-setvelocity-physics/

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...