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.

XDGabzXD

Member
  • Content Count

    79
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About XDGabzXD

  • Rank
    Member
  1. Not to worry! I have worked it out myself! If anybody needs to know how to do it then reply to this chain
  2. Hey! Basically, I am looking into creating a game in which you are a champion / hero and you have four abilities. The first, is going to buff your champion and give him 10 more attack damage for 5 seconds with a 10 second cooldown. I am using Javascript, and tried to achieve this by writing this code - var ChampionInformation : ChampionInformation; var countDownTimer = 0; var cooldown = 10; var CountDownText : GUIText; function Start () { ChampionInformation = gameObject.GetComponent("ChampionInformation"); } function Update () { CountDownText.text = "" + countDownTimer; if(countDownTimer <= cooldown && countDownTimer >= 0) { CountDownOne(); } if(Input.GetKeyDown("space") && countDownTimer <= 0) { AddDamage(); } } function AddDamage () { countDownTimer = countDownTimer + cooldown; ChampionInformation.AttackDamage = ChampionInformation.AttackDamage + 10; yield WaitForSeconds(5); ChampionInformation.AttackDamage = ChampionInformation.AttackDamage - 10; } function CountDownOne () { countDownTimer = countDownTimer - 1; yield WaitForSeconds(1); } This kind of works - The champion gets 10 more attack damage and this is displayed. However, I can rapidly press space and the champion keeps getting attack damage that decays over time. This is because the cooldown system isn't working. Can anybody help me? Thanks. -Gabz // Virex (Depends how you know me)
  3. Its first person, already quite far developed. I dont see how that effects this short piece of code?
  4. My AI robot spiders have worked a treat and are really nice, the only thing is at the moment their 'DoDamage' function is just this : function DoDamage() { if(damageTimer==0.0) { damageTimer = Time.time; } if((damageTimer+0.15) > Time.time) { return; Blood.renderer.enabled = false; } else { player.hitPoints = player.hitPoints - 10; print(player.hitPoints); damagerTimer = Time.time; Blood.renderer.enabled = true; AudioSource.PlayClipAtPoint(shootsoundgun, transform.position); } } I want to develop this so it works with raycast that can do damage to other robots it hits aswell as just the player so with that inmind i was thinking about friendly robots. I hope someone can give me an idea on how to do this (:
  5. So i am making a 'simple' floating script where i want the object that has a child object of a camera to move up (y) at a variable speed when you press space and it stays there but if you dont touch space then it goes down (y) the same speed and still floats there. Do you understand what im trying to do and could someone help me cause the only way i no how to do that is with transform.position.y but that didn't work :/
  6. Ah good idea, i tried that but the only script that worked was the character damage one, the others didn't work :/
  7. So my game hasn't got insane graphics or crazy long scripts, in the test map i only have one building made from cubes, gun models to pick up and the player model. Then i have 2 ai turrets that walk with animation towards player if he is in sight and rotate towards him also with the ontop turret to shoot if he is close enough to the turret and that is it but when i build te game it is very laggy, but when i kill the turrets it is less laggy. How can i reduce lag within my game? Thanks
  8. Yes that animation still works but i cant bend the joints in unity.
  9. No, what i am trying to say is i rig something in cinema 4d and export to unity properly but if i move the rig points to move the persons arm in unity then it doesn't move; the rig object is just like a null object.
  10. So i use c4d for all my characters and everything and rigging them and animating them is fine but if i was to try and move these joints/bones in unity then they have no effect and are just like null objects. How do i make it so i can move the joints and still change the mesh in unity? Do i need a different programme?
  11. its fine with that, its the set up of the script that it doesn't like with the = signs i get 3 errors BCE0044: expecting ), found '='., BCE0043: Unexpected token: 10., BCE0044: expecting :, found '='.
  12. if(player.EXP = 10) { player.level = 1; } i have already set up the player variable with many other components but this line of code is rejected. How should i be scripting this simple bit of code?
  13. XDGabzXD

    Player Setup?

    Okay so the only thing i could find to help me a little bit was this: http://www.youtube.com/watch?v=JzT8iPWWjVU but i already could do that but then where the arms are how would i add my animations?
  14. XDGabzXD

    Blinking Lights?

    Animation could be your friend, so it smoothly changes, then you can have it looping. If you need more help just ask me and i will explain fully
×
×
  • Create New...