Okay so i want to make it so when i press Ctr that the spell will show up, how do i make it so it doesnt show up till i click it? im using this script
// Instantiates a projectile every 0.5 seconds,
// if the Fire1 button (default is Ctrl) is pressed.
var projectile : GameObject;
var fireRate : float = 0.5;
private var nextFire : float = 0.0;
function Update () {
if (Input.GetButton ("Fire1") Time.time > nextFire) {
nextFire = Time.time + fireRate;
var clone : GameObject =
Instantiate(projectile, transform.position, transform.rotation) as GameObject;
}
}
What do you mean by “make it so it doesnt show up till i click it?”
From the look of the code, it doesn’t instantiate anything unless the “Fire1” button (left mouse/ctrl by default) is pressed.
Okay so it won show up so like i can run around, and it wont be there but when i press ctr it will cause dont i need it on the scene for this?
but i need it to be a skill so you press crt it will appear
You’ll need to be a bit more specific. I still have no idea what you’re looking for.
Okay so i have that script how do i make it so when i press ctr a partial affects will show up…
First, I’ll assume you meant particle, and to do so, you would Instantiate a particle effect stored as a prefab.
hmmm okay ill try it and sorry i am well… never mind lol