Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

thelegokid4455

How to create a simple AI W/ waypoint and shooting projectiles!

Recommended Posts

this works for the fps kit!!! also for those not using  the fps kit.

we will be using unity3d bootcamp animated soldier.

 

what it does:

goes in a yapoint area

if sees player, it attacks, if player goeas further, it chases for 3 seconds

then give up and return to patrolling the waypoint

 

showcase:

 

 

 

1.download and export unity3d bootcamp's animated soldier into ur project (ALL OF THE ANIMATIONS NEEDED)

2.download and export unity3d simple fps tutorial... i think its on the downloads section on this forum.

 

then, add the soldier into the scene.

add this animations:

Soldier@StandingAim = rename animation into "idle" (no capital) then add into soldier

Soldier@RunAim = rename into "run" then add into soldier

Soldier@StanidingFire = rename into "shoot" then add into soldier

Soldier@WalkAim = rename to "walk" and then add to soldier

 

like so:

Please login or register to see this link.

 

then, add the scripts: "AI,AIanimations and Character Damage"

also add an AudioSource and a CharacterController

then assign the variables like so:

Please login or register to see this link.

 

(the die sound is up to you)

(Dead replacement is a soldier ragdoll)

 

then, create an empty gameobject, and assign it in front of the soldier.

add the script, "Rocket Launcher"

 

then assign the vars:

initial speed: 30

reaload time: 0.001

bullet count: 100000

 

for the projectile,

create a muzzle flash and a bullet model in your modelling software. or just use a cube and a sphere.

Please login or register to see this link.

 

 

assign a muzzleflash texture to the cube. remove the collider from the cube.

then create the bullet. add a sphere collider and rigidbody (gravity must be off)

then child the cube to the bullet. add "timedobjec destructor" script to the miuzzleflash and set it to "0.05".

 

 

then, add an audio source to the bullet gameobject. that will be the firing sound (assign a gun sound).

then add the script "rocket"

Please login or register to see this link.

 

(if u are using the oma's fpskit, follow 1@, if not, follow 2@)

 

1@

1.now, on the fps kit, there is a script called explotion-advanced

2.assign it to a empty gameobject with an audiosource. then, aaign the varialbes like this. (ignore the sounds)

Please login or register to see this link.

 

 

2@

1.do like on top but using the explotion advanced script.

 

now, create this, and the bullet a prefab.

 

now, assign the bullet(prefab) to the projectile(on the empty gameobject)

then, for the explotions(variable), add the thing we just did.

 

(like this)

1.Please login or register to see this link.

 

2.Please login or register to see this link.

 

3.Please login or register to see this link.

 

(woah, there goes my space, but anything for you guys. ***Ignore this message***)

 

then, for the waypoint, create 4 empty gameobject. then make it 1 meter from the ground. make it a square shape

like so:

Please login or register to see this link.

 

then, assign the waypoint script (from the fps tutorial kit)

 

there you go!!! if you find any glitches or problems, comment below!!!

 

Glitches found,

if you crouch, the enemy cant shoot you unless you lower the spawnpoint of the projectile

 

thnx, its simple if you wacth it from techzonetv's channel on youtube!!!

 

thnx!! subscribe to my channel,

@thelegokid4455

 

ill give video soon!!!

Edited by thelegokid4455
  • Like 2

Share this post


Link to post
Share on other sites

Please login or register to see this link.

 

 

there you go.....

 

and like and subscribe to my channel or, just in this forum o:-)

(im not forcing you to, its just if you want to)

 

 

but thnx if you do...

  • Like 1

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

 

No errors, but I'm not sure what I'm doing wrong. I'll try again later today, to see if I can get lucky.

Share this post


Link to post
Share on other sites

First of all you have 1 post, you joined last year So obviously you've just been leeching. And now you want a download for a tutorial? Tutorials are made to learn from. If you're just downloading shit all over the place what's the point of even trying to make a game if you don't want to put in the work?

 

Edit: This thread is also FOUR years old.

Share this post


Link to post
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.

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.


×
×
  • Create New...