Survival Game Series damage help

Updated on January 11, 2017 in Unity
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
6 on August 24, 2015

So im on Episode 6 of the series and so far its been going well sort of
I use Unity 5 and so doing the animation stuff inside unity is such a pain to make it work, I eventually got it to work for once but, the damage the sword does is like sometimes different I think or whatever but it does way more damage then the variable damage I set it to. Like lets say I set the sword damage to 50 and enemy health to 100, I hit the enemy once and it just kills it.. Wtf???
Someone please help me

  • Liked by
Reply
0 on August 24, 2015

First. Always post the script you are talking about not everyone follows the same tutorial.
Second. The Survival Game Series is really old and you will have to change alot to get it to work in the newer versions of Unity.

  • Liked by
Reply
Cancel
0 on August 24, 2015

Yea put the script. I am doing the same series with Unity 5. Currently 11th episode. And my damage is fine it does 50 as i put in script on my mace.

  • Liked by
Reply
Cancel
3 on January 10, 2017

Hey, My case is even worse
I am on episode 2 of survival game and my object does not even do any Damge.
Please Refer to the following Script And help me.

1)MeleeSystem.js

#pragma strict

var TheDamage : int = 50;
var Distance : float;
var MaxDistance : float = 1.5;

function Update ()
{
if (Input.GetButtonDown(“Fire1”))
{ var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward), hit))
{
Distance = hit.distance;
if (Distance < MaxDistance)
{
hit.transform.SendMessage(“Apply Damage”, TheDamage, SendMessageOptions.DontRequireReceiver);
}
}
}
}

2)EnemyLogic.js

#pragma strict

var Health = 100;

function ApplyDamage (TheDamage : int)
{
Health -= TheDamage;
}

Master
on January 10, 2017

Please next time create your own thread!
 
What Unity version are you using? If it’s Unity 5.x I’d recommend you to move on to another tutorial since this one is outdated and should not be used in the latest Unity versions.

on January 11, 2017

I am currently using unity 5 
Can you please guide me on how to go on with this
Thanks

Master
on January 11, 2017

No I can’t, it’s too outdated to do so in an easy way, I’d recommend you to move on to a different tutorial

Show more replies
  • Liked by
Reply
Cancel