Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
-4
Question by zachary · Aug 16, 2010 at 07:39 AM · charactercontrolhealthbarhealth-deductionhealth

how do u make diffrent chacters and give them commands 2 do things

i was wondering how u make cpu,s and give them commands also how to give ur character have health and also give the cpus health so i can get an army and fight against other armys

i would so appreciate if anyone could help ive had this question 4ever

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image · Aug 16, 2010 at 07:56 AM 4
Share

You've asked a lot of questions there. I'm assu$$anonymous$$g you mean "NPCs" when you say "cpus". You haven't even said what type of game you're hoping to make (FPS/TPS/RTS/turn-based/etc). UnityAnswers is generally for help with specific problems. $$anonymous$$any of your questions may already have been answered (for example, see http://answers.unity3d.com/questions/8348/how-to-create-an-npc-enemy-which-can-take-damage-and-be-killed-when-its-energy-or)

You should read up on what you can and have a go yourself first. Then you can ask for help once you get stuck on specific problems.

avatar image Shkarface · Oct 05, 2011 at 01:46 PM 0
Share

just mail me i have what you want in my $$anonymous$$d, i created i $$anonymous$$m game, that you have your $$anonymous$$m fire, shoot, and fight with you with only CPU

Shkarface@Gmail.com

2 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by Dok101 · Dec 28, 2013 at 09:28 PM

Well for CPUs you will obviously need to have an AI (Artificial Intelligence). This is possible to create but very hard. Im not sure what type of army you are planning to make (as in whether its swordfighters, gunfighters etc.) but there are many AIs on the asset store that are specifically for shooting CPUs. You can use these in your game until you become more experienced and know more about Unity.

To give your character health that can be taken away when hit just make a variable called damage, another called health and another called CPU health. Use Physics.Raycast to find out if when the player attacks he is facing the enemy and within a certain range. If those conditions are true then CPU health = CPU health - damage;

Then you could also have in the update function damage = Random.range (10,20); which means that the CPU health will be going down by a random number between 10 and 20. Or you could have it is as a set number and make it go up if you buy a better sword. For the CPU you could have a Physics.Raycast again and every 5 seconds if the CPU is within a certain range of the player then health = health - damage; Obviously then you can make a boolean called shield and when a button is pressed shield = true; so if shield = true damage = 0; and then do the same for the AI

Hope this brief explanation helped

Just ask if you need any more help

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by DayyanSisson · Oct 05, 2011 at 10:12 PM

You should learn how to use Unity and scripting first before you jump right into it. Look at this question. It will definitely help.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to make camera position relative to a specific target. 1 Answer

How To Make Player Health Increase if in a Certain Animation State 1 Answer

Player health dropping far to fast 1 Answer

Character don't die 2 Answers

Health bar goes down instantly. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges