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
0
Question by Michael 16 · May 06, 2011 at 02:40 PM · animationcenterflyingmultitasking

flying enemy from another game and animation problem.

First of all sorry if I ask too much questions lastly but I got ALOT of problems. Now I need help with 4 problems, 3 is about the same enemy:

1: I created in another game I made a flying enemy. In the game I created everything was perfect and now I want to use it one more time but it have more abilitys: it drops rocks when it fly above me, summon other 2 enemies and land in the base (in the first game he fly untill he die). everything worked fine but I got problem when I wrote the code to summon the enemy, it don't drop the rocks anymore (task it did before) and don't summon the enemies. How I can make it works?

2: The flying enemy don't take off like he did in the other game. In the other game he took off up untill he was 40 meters in the air (distance from the land) from every spot on the land. I use that part of the script for that: function Update ()<br> {<br> landDistance = Vector3.Distance(land.position, transform.position);</p> <pre><code> if (landDistance &lt; inAirRange) { fly (); } else { stopFly (); } if(isItAttacking) { attack (); } } function fly () { isItAttacking = false; renderer.material.color = Color.red; transform.Translate(Vector3.up * moveSpeed *Time.deltaTime); } function stopFly () { isItAttacking = true; renderer.material.color = Color.black; }

Now, in the second game, it do it only when he close to the center of the land, meens that the radius from the center of the land is the range between the land and the enemy. How to solve it?

3: (the last question about that enemy) After the enemy do all what it needs it should go back to the base. It fly back untill he get for the spot he need to land, but I don't know what code to write for landing (like a helicopter). what code to write for landing?

4: I crated an enemy with 3 animation: walk, aim and put the gun away. when I get close to him it should aim on me but don't shoot, it do the animation for that but in loops and he seems "dancing", it should do it only ones, I checked it and it on "do ones". when I get closer it getting closer to me and he should do the "walking animation". insted, it stop to "dance", not do the animation he needs to do and when it needs to shoot it start "danceing" again... What I need to do so he will stop "dancing"? (It an enemy I imprted from Blender and I never had problems with imported animations).

Sorry for very bad english...

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 Michael 16 · May 06, 2011 at 03:00 PM 0
Share

Thing i forgot to write in question 2: the problem started before I changed the script. I wanted to check the script if it still works.

avatar image Alec-Slayden · May 06, 2011 at 06:36 PM 0
Share

It's actually a good idea to split up separate unrelated problems and ask them in separate questions. That way if someone else has the same problem, they can find the answer easier. It also increases the odds of you getting an answer at all.

0 Replies

· Add your reply
  • Sort: 

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

1 Person is following this question.

avatar image

Related Questions

Can I make animations snap to a frame? 1 Answer

Flying AI enemy with many tasks 1 Answer

How to select an animation clip by index number? 7 Answers

Can the animation editor create local rotational data? 3 Answers

Adding animation clips via script 2 Answers


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