So Far So Bad :)

ok so i kinda got what i want in here so far. Shooting reloading (Although if you reload you cant shoot anymore) its got the basics of what i need heres the project:
I will not be releasing a build until i can fix this code here:

var AnimationBlending = pc.createScript('animationBlending');

AnimationBlending.states = {
    reload: {
        animation: 'anim_ak47_reload.json'

// initialize code called once per entity
AnimationBlending.prototype.initialize = function() {
    this.blendTime = 0.2;, this.keyDown, this);, this.keyUp, this);
AnimationBlending.prototype.update = function(dt) {
    var AudioEntity ='reloadSound');
  if ( {
      isReloading = true;'reloadSound');
      //this.script.gun.enabled = false;
   /* if (this.state === false) {
        this.scripts.enabled = false;

AnimationBlending.prototype.setState = function (state) {
    var states = AnimationBlending.states;

    this.state = state;
    // Set the current animation, taking 0.2 seconds to blend from
    // the current animation state to the start of the target animation.[state].animation, this.blendTime);

/*AnimationBlending.prototype.keyDown = function (e) {
    if ((e.key === pc.KEY_R) && (this.state !== 'reload')) {

I am still working on this looking for a way to let the player shoot after reload ‘R’
also i am waiting until i can get the AI to die which is like impossible rn :slight_smile:



Doesnt work i am still working with it and im busy 90% of the time doing something else if anyone has any suggestions or im missing something or if you even want to help please show some feedback love in the comments :slight_smile:
Nathan Hawkins