using UnityEngine;
using System.Collections;
using ORKFramework;
using ORKFramework.Behaviours;
public class setOrkVars : MonoBehaviour {
//Var's Start____
//health vars
public int maxHealth;
public int currentHealth;
//Mana Vars
public int maxMp;
public int currentMp;
//Attributes
public int Strength;
public int Agility;
//xp var
public int Xp;
public int currentxp;
//bools
public bool spawn;
//ammo vars
public int shotgun;
public int pistol;
public int assualtrifle;
public int maxpistol;
public int maxshotgun;
public int maxar;
//Var's End___
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
CombatantComponent combatantComponent = gameObject.
GetComponent<CombatantComponent> ();
if (combatantComponent != null) {
Combatant combatant = combatantComponent.combatant;
combatant.Status [0].SetValue (maxHealth, true, true, true, false, true, true);
combatant.Status [1].SetValue (currentHealth, true, true, true, false, true, true);
combatant.Status [2].SetValue (Xp, true, true, true, false, true, true);
combatant.Status [3].SetValue (Strength, true, true, true, false, true, true);
combatant.Status [4].SetValue (Agility, true, true, true, false, true, true);
combatant.Status [5].SetValue (pistol, true, true, true, false, true, true);
combatant.Status [6].SetValue (maxpistol, true, true, true, false, true, true);
combatant.Status [7].SetValue (shotgun, true, true, true, false, true, true);
combatant.Status [8].SetValue (maxshotgun, true, true, true, false, true, true);
combatant.Status [9].SetValue (assualtrifle, true, true, true, false, true, true);
combatant.Status [10].SetValue (maxar, true, true, true, false, true, true);
}
}
}
It looks like you're new here. If you want to get involved, click one of these buttons!
So, this component is attached to your combatant's prefab, and the combatant wont spawn while it's attached? But it spawns when the component is not attached to the prefab?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames
Follow the game Development on Twitter https://twitter.com/Fore_Lore_Games
or check out the face book page here https://www.facebook.com/ForeLoreGames