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.
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
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?
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
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).