Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by M-Mahad · Jul 16, 2016 at 06:53 AM · programmingbeginnerfunction

Can somebody tell me which functions I would need to use to make this pseudocode work?

psuedocode for archer direction and shooting:

make 4 idle direction animations containing first frame make 4 directional shooting animations with leftover frames

1)when left key is pressed,left idle animation is played infinitely even if left key is lifted. if left idle animation is playing and spacebar is pressed,left shooting animation/arrow sound is played for as long as spacebar is pressed. projectile/object is launched in left direction when left shooting animation is played.

on collison with right direction walking monster,monster is defeated and monster death animation/bloodpool/death sound is played. score of 10 points is added to the score meter.

2)when right key is pressed,right idle animation is played infinitely even if right key is lifed. if right idle animation is playing and spacebar is pressed,right shooting animation/arrow sound is played for as long as spacebar is pressed. projectile/object is launched in right direction when right shooting animation is played.

on collison with left direction walking monster,monster is defeated and monster death animation/bloodpool/death sound is played. score of 10 points is added to the score meter.

3)when down key is pressed,down idle animation is played infinitely even if right key is lifed. if down idle animation is playing and spacebar is pressed,down shooting animation/arrow sound is played for as long as spacebar is pressed. projectile/object is launched in down direction when down shooting animation is played.

on collison with up direction walking monster,monster is defeated and monster death animation/bloodpool/death sound is played. score of 10 points is added to the score meter.

4)when up key is pressed,down idle animation is played infinitely even if up key is lifed. if up idle animation is playing and spacebar is pressed,up shooting animation/arrow sound is played for as long as spacebar is pressed. projectile/object is launched in up direction when up shooting animation is played.

on collison with down direction walking monster,monster is defeated and monster death animation/bloodpool/death sound is played. score of 10 points is added to the score meter.

archer death psuedocode:

if left monster reaches player,Game Over title/game over music is shown onscreen. if right monster reaches player,Game Over title/game over music is shown onscreen. if up monster reaches player,Game Over title/game over music is shown onscreen. if down monster reaches player,Game Over title/game over music is shown onscreen.

monster psuedocode:

right monster spawn point in left direction. spawn every 2.5 seconds. play right monster walk animation and move it right until player is reached. game over if player reached. blood pool/death animation/death sound played if contact with arrow.

left monster spawn point in right direction. spawn every 4 seconds. play left monster walk animation and move it left until player is reached. game over if player reached. blood pool/death animation/death sound played if contact with arrow.

down monster spawn point in up direction. spawn every 3 seconds. play down monster walk animation and move it down until player is reached. game over if player reached. blood pool/death animation/death sound played if contact with arrow.

up monster spawn point in down direction. spawn every 1.5 seconds. play up monster walk animation and move it up until player is reached. game over if player reached. blood pool/death animation/death sound played if contact with arrow.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by JannickL · Jul 16, 2016 at 10:28 AM

Everything in your project is pretty basic. Learn the Unity and C# basics, than you should get it.

Maybe this one could help: https://unity3d.com/learn/tutorials/projects/survival-shooter-tutorial

For any help you can also add me at Skype: Jaudatus

Comment
Add comment · Show 4 · 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 M-Mahad · Jul 16, 2016 at 08:03 PM 0
Share

oh thanks but the problem is i don't know about the functions and methods to make these things like direction work.Can you please give me a list of the most used functions?A cheatsheet?

avatar image JannickL M-Mahad · Jul 16, 2016 at 08:13 PM 0
Share

There are many different ways to solve your "ideas". Can't give you any specific functions. You need to understand how the engine works, than you can take a look what you need and then you can get it from: http://docs.unity3d.com/ScriptReference/

For sure you always need to know what a GameObject is, what private or public means, where the difference between float and integer is, what the difference between a GameObject and a gameobject is, you will need to know how if-statements work and how collisions are handled. $$anonymous$$ake sure you understand the most used components for GameObjects, for example: - $$anonymous$$esh Renderer - Collider (Box, Spehre, $$anonymous$$esh etc.) - Audio Source - Animation/Animator - Rigidbody - Transform

You see, there's alot of stuff to learn.

If you want to start i can help you, no problem, just add me at skype (Jaudatus), then i can show you what the basics are and give you some examples for your code.

Greets

avatar image M-Mahad JannickL · Jul 16, 2016 at 09:07 PM 0
Share

i know what a GameObject is and the difference between gameobject and GameObject.I also know how if statements work and about the collidor component,animation/animator,transform and rigid body components.Only stuff i dont know much about are collisions,Audio Source and $$anonymous$$esh Renderer.And also i would love it if you could answer all my questions here rather than on Skype since I am not that used to talking to strangers(no offense).

Show more comments

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

65 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity's 2d shooting can not be found:unityの2dシューティングがありません 0 Answers

Trouble Navigating Pause Menu.... 0 Answers

Why is the private int variable in this c# program not updating? 1 Answer

Use a class like a function 1 Answer

Problem with my Coroutine 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