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.


  • Content Count

  • Joined

  • Last visited

  • Days Won


giltine528 last won the day on February 24 2017

giltine528 had the most liked content!

Community Reputation

76 Excellent

About giltine528

  • Rank
  • Birthday 11/03/1997

Profile Information

  • Gender
    Not Telling
  • Location:

Recent Profile Visitors

1,010 profile views
  1. giltine528

    Object tilt on movement doesnt quite work as intended

    Alright, thanks for the tip
  2. giltine528

    Object tilt on movement doesnt quite work as intended

    Oh, interesting, thanks for sharing
  3. So, what i want is for a transform to tilt a bit based whenever he is walking to left or right, but the problem is that, if i start tilting in negative direction (Which is to right side), my character doesnt quite rotate as it should, this is got to do something with eulerAngles probably, so my question is, how does one solve this? using System.Collections; using System.Collections.Generic; using UnityEngine; public class RotationOnDirection : MonoBehaviour { public float z; void Update () { if (z >= 1) z = 1; if(z <= -1) z = -1; if (Input.GetKey(KeyCode.A)) { z += Time.deltaTime; Vector3 euler = transform.localEulerAngles; euler.z = Mathf.Lerp(euler.z, z*15, 2.0f * Time.deltaTime); transform.localEulerAngles = euler; } if (Input.GetKey(KeyCode.D)) { z -= Time.deltaTime; Vector3 euler = transform.localEulerAngles; euler.z = Mathf.Lerp(euler.z, z*15, 2.0f * Time.deltaTime); transform.localEulerAngles = euler; } } }
  4. giltine528


    Looks nice, keep it up!
  5. giltine528

    Vitalfight Has Been Released! [FREE]

    Good job! Hope to see more projects from you in the future, give it your best! I was like you when I started, and its kinda nostalgic to look at stuff like this. :upvote:
  6. Was just interested if there was something handy that you wished that someone had told you when you started with Unity?
  7. giltine528

    Melee system that uses triggers?

    Okey Ive solved it with your idea by using Enter and Stay, but your method only is viable on one enemy, because once your hit one enemy, it enables the bool "once" and it cant damage the other enemies until the attack animation ends. I dont know if my approach was great but what I did is every time you hit someone, you Add that enemy to the list, and when another OnTriggerEnter event during attack animation occurs, it checks if the enemy is already in the list, if not apply the damage if yes, dont.
  8. giltine528

    Melee system that uses triggers?

    Hello fellow unity members, its been a while since ive worked on something and now i came back and wanted to create couple of things. One of them being the melee system that uses "hit on touch" method or how do you say it. So what I want, Is whenever player swing his sword(plays animation) and if it touches the enemy, it damages it! I used OnTriggerEnter method void OnTriggerEnter(Collider other) { if (other.tag == "Enemy" && isAttacking) { Shake(0.2f); other.gameObject.GetComponent<EnemyHealthManager>().HurtEnemy(damage); } } It works fine, but there couple of problems 1.(0:00) If the sword is inside an enemy and you press attack, the enemy wont receive damage, because enemy was already in the trigger and didnt enter it. 2.(0:46) If you swing your sword randomly during the animation, the damage is applied multiple times, since it enters the trigger multiple times. Any idea on how to fix it? Please its really important, because if i get this problem solved, I might have my motivation back up on making a real project for once. Thanks!
  9. giltine528

    Getting variables from base class? c++

    So lets say I have #include <iostream> using namespace std; class A{ protected: int random_number=10; public: A(){} A(int a){ random_number= a; } }; class B: public A{ public: string Text(){ string temp; if(random_number>9) temp="Yes"; else temp="No"; return temp; } }; int main(){ A a(5); B b; cout<<b.Text(); return 0; } How can I give my base class(A) "a" variable "random_number" value (which is 5) to my b class so it can print out the correct value?
  10. giltine528

    Help with math a bit

    So I got a bit confused with one of the math questions Ive got and idk how to approach it, Ill bring out my solution but Im guessing its wrong: Problem: Chemical liquid consists of 3 ingredients(a,b,c) which are defined as percentages, so for example a chemical liquid consists of materials a-50% b-20% c-30%. Find out the new chemical liquids percentage expression if we pour the x% amount of selected ingredient to the current liquid. So for example if we pour 30% of "a" material into a liquid that consists of materials a-50% b-20% c-30% how will percentages change on these 3 values? Im guessing you just go like: 50*1.3=65% 20*0.7=14% 30*0.7=21% ? Thank you.
  11. giltine528

    Dashing when looking at nothing?

    True, that worked heh, on the other note, is my method of dashing done correctly or there is a better way?
  12. giltine528

    Dashing when looking at nothing?

    Hi, I havent programmed in a while, but I just wanted to do something fun atm. So first of all I wanted to create a dashing script, where the player when looked at certain object or empty space would dash to the location. I think I got the, looking at the object dashing, part correctly. But how do I go with dashing when looking at nothing? Dashing also includes the y axis, so you can do it into the air like a ninja. Here is the script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class MovementController : MonoBehaviour { public float Range; public Transform empty; public Transform Player; Camera cam; bool lerp; Vector3 pos; void Start () { cam = Camera.main; } void Update () { if (lerp) Player.position = Vector3.Lerp(Player.position, pos, 10f * Time.deltaTime); if (Vector3.Distance(Player.position, pos) < 1f) lerp = false; if ((Input.GetKeyDown(KeyCode.E))) { Ray ray = cam.ViewportPointToRay(new Vector3(0.5F, 0.5F, 0)); RaycastHit hit; if (Physics.Raycast(ray, out hit, Range)) { if (!lerp) { Transform obj = Instantiate(empty, hit.transform.position, transform.rotation); pos = obj.position; pos.x = hit.point.x; pos.y = hit.point.y; pos.z = hit.point.z; obj.position = pos; lerp = true; } } else { if (!lerp) { } } } } }
  13. Note: This is all based on my current experience as of writing this, if you have anything to add that will help this post improve, feel free to share. My previous guides: 1.In depth guide of understanding the usage of colors- https://armedunity.com/topic/14303-in-depth-guide-of-understanding-the-usage-of-colors/ First of all I would like to remind you that all of these software and methods are free, you don't need to pay anything to use them. And overall this topic only covers non-paid methods on making yourself some sfx and music for your project. To start things with. 1.Audacity: -Probably the majority people know this peace of software. It's free and is being used for recording, editing and exporting audio. In here you can tweak your audio to suit your needs (make it "loopable", have normalized levels etc.) You use it at the end of your process after using all of the other softwares that will be listed below. Get audacity: http://www.audacityteam.org/ 2.Otama: -Its a browser only program (it requires a flash to use), that is probably good being used only if you're in a rush mode to make some quick background music for your project. You just put nodes, change their direction and then you get different melodies. Get Otomata: http://earslap.com/page/otomata.html 3.Jukedeck: -It another brower only thingy, but comparing to Otama, this one is a masterpiece, you select what kind of music you need, tweak what style you want, how many beats per minute you desire. And then computer automatically generates it. Its pretty neat. If you want to use your generated music for free, you can just give them credits, however only for 1$, you can buy the license of it and use it however you want. Use jukedeck: https://www.jukedeck.com/ 4.Boscaceoili: -This one requires a download in order to use it. Its a free software in which you can make your own music, thought It is recommended to watch some tutorials in order to be able to use it. One negative aspect might be is that it ha a messy interface. Get Boscaceoili: http://boscaceoil.net/ 5.Now into the sfx stuff, bfxr-retro: -In this software you can generate retro style sound effects for your game, tweak them to your needs, and use them. Simple. Get bfxr-retro: http://www.bfxr.net/ 6.Lmms: It's a piece of software, suggested by @SATORI which is also completely free. It takes some time to get a hang of it, but once you do, even if it lacks couple of features, it gets the job done! Get lmms: https://lmms.io/ TL;DR Out of all these softwares, audacity is a must, Jukedeck is the easiest with the best results and bfxr is the way to go with retro games.
  14. giltine528


    Its just an idea, but besides just killing the monsters you can also do objectives to spice up the gameplay. Like an arrow shows up where to go and for example you need to capture a point, or defend one, or like destroy an artifact of some sort. That would be pretty neat.
  15. giltine528


    Very interesting project, hope to see some more progress video in the future, keep it up!