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.

  • 0
Sign in to follow this  
czshow35

Script help me

Question

Hello I'm language little English.

 

I auFPSKit downloaded

 

Zombie model, soldier model and animations added.

 

Enemy health and damage do not add

 

script added help me. (make a video)

 

failed video:

 

Edited by czshow35

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Your answer is in your console. PlayerDamage does not exist in your implementation. Change ApplyDamage to PlayerDamage.

 

conversion:

add your namespace just like you see in other c# scripts

change function to void

change var dead : Rigidbody = to Rigidbody dead =, same goes with other variables

remove the period after GetComponent so it’s GetComponent<Something> instead of GetComponent.<Something>

 

thats the basics of converting js to c# in a nutshell. Don’t really need a converter for such a small script

Share this post


Link to post
Share on other sites

  • 0

Thanks I edited the script.

playerHealth script add  > Soldier AI I was able.

playerHealth script add > Zombie AI error (PlayerHealth c#)(Zombie AI js)

Share this post


Link to post
Share on other sites
  • 0

Js and c# cannot interact without forcing one to compile first. Your best bet is to just convert the js file to c#

Share this post


Link to post
Share on other sites
  • 0
 

conversion:

add your namespace just like you see in other c# scripts

change function to void

change var dead : Rigidbody = to Rigidbody dead =, same goes with other variables

remove the period after GetComponent so it’s GetComponent<Something> instead of GetComponent.<Something>

Share this post


Link to post
Share on other sites
  • 0

 

No need anymore.

Found in the script section

 

big thanks ArmedUnity

 

current problem player damage

 

 

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
Answer this question...

×   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.

Sign in to follow this  

×
×
  • Create New...