Axivex
Axivex
Explore posts from servers
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
No description
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
ok since its workin now, what was debuggin supposed to show me 😭
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
No description
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
still dont know what this means though
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
No description
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
No description
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
huh
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
so when stepping after the line it just goes back to the start of the method and keeps loopin
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
when stepping through it
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
ok yea I have no 0 idea whats happening :b_confused:
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
yep
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
uhh ok so I set up the breakpoint now how do I step through the code :/
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
alr ill try debuggin myself
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
ok I clearly was too vauge on what happens
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
ok
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
No description
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
https://paste.mod.gg/zuktwfzzympd/0 https://paste.mod.gg/wjyrqznotmqd/0 - everything in the other script (basically nothing)
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
oki
59 replies
CC#
Created by Axivex on 2/20/2025 in #help
Trying to enable/disable sprite of a different object
public class groundAttack : MonoBehaviour { private attack1_Sprite attack1Sprite; private SpriteRenderer sprite; private BoxCollider2D trigger; attackCaller attackCaller; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { attack1Sprite = GetComponent<attack1_Sprite>(); sprite = GetComponent<SpriteRenderer> (); trigger = GetComponent<BoxCollider2D> (); attackCaller = GameObject.FindGameObjectWithTag("attackCaller").GetComponent<attackCaller>(); } private float time = 0.0f; [SerializeField] public float warn = 0.75f; // Update is called once per frame void Update() { //if script is called
} public void attack1() { time += Time.deltaTime; sprite.enabled = true; if (time >= warn) { attack1Sprite.attack1Sprite.enabled = true; trigger.enabled = true; if (time >= 0.75) { attack1Sprite.attack1Sprite.enabled = false; trigger.enabled = false; time = 0.0f; sprite.enabled = false; attackCaller.cooldown = 0.0f; attackCaller.attackChosen = false; } } }
59 replies