Important News

We have released Shinobi Life Online Pre-Alpha Version 1.1.0.0! This update features Earth Release: Earth Dome Jutsu, Aiming Mode and more! Try it out and tell us what you think.

User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

Discord

Statistics

Members
Total Members: 64473
Latest: prednisone 50
New This Month: 342
New This Week: 18
New Today: 4
Stats
Total Posts: 77098
Total Topics: 22612
Most Online Today: 1307
Most Online Ever: 4232
(January 14, 2020, 07:47:33)
Users Online
Members: 2
Guests: 1275
Total: 1286
Bogdanrqx
Veronallw
Google (9)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Kakashi Natsu

Pages: 1 [2]
16
Programming / Chase Script actual code c#
« on: August 11, 2016, 02:34:07 »
it goes haywire when it comes incontact with two players.
Modified(Edited code): enemy now goes unhuman speeds when he moves to the player, then he just stops..., moves out of his trigger box, moves back in again normal then it speeds up.

@Vreg

Code: [Select]
void OnTriggerEnter(Collider other){ //this will check what has entered the trigger


if (playerchosen) {

} else {
if (other.gameObject.tag == "Player") {
print ("player found");
playerchosen = true;
Player = other.gameObject;
}

}
print ("Player Chosen: " +playerchosen);

}
void OnTriggerStay(Collider other){

if (playerchosen) {
Vector3 direction = Player.transform.position - this.transform.position;
Quaternion rotation = Quaternion.LookRotation (direction);
if (rotation.x != 0) {
rotation.x = 0;
}
if (rotation.z != 0) {
rotation.z = 0;
}
this.transform.rotation = Quaternion.Slerp (this.transform.rotation,
rotation, Time.deltaTime + damping);

if (Vector3.Distance (Player.transform.position, this.transform.position) < 15) {
anim.SetBool ("IsIdle", false);
if (direction.magnitude > 1) {
this.transform.Translate (0, 0, 0.1f);
anim.SetBool ("IsWalking", true);
anim.SetBool ("IsAttacking", false);
} else {
anim.SetBool ("IsAttacking", true);

if (canAttack) {
print ("Before invoke");
canAttack = false;
Invoke ("waiting", 2f);
print ("After invoke");
} else {

}
anim.SetBool ("IsWalking", false);
}

} else {


}

} else {
playerchosen = false;


}

print ("Player Chosen: " +playerchosen);
}

void OnTriggerExit(Collider other){ //this will check what has left the trigger

if (other.gameObject.tag != "Player") {//if the game object that left was not a player

playerchosen = true;
} else {

anim.SetBool ("IsWalking", false);
playerchosen = false;
print ("Player left");
}
print (playerchosen);
}

17
Programming / Chase Script idea
« on: August 10, 2016, 22:01:01 »
For our game we have enemies that can chase you. SHould the chase be based off player position or whether the enemy can see you or not.

18
Programming / Jumping script help c#
« on: August 08, 2016, 22:05:58 »
EDITED: FIXED>> NO NEED FOR HELP.

i need help with this jumping script:
(UPDATE): I got it to work, I dont know if there is a more efficient way to script this.
Code: [Select]
void FixedUpdate(){


float straffe = Input.GetAxis ("Horizontal") * speed;
float translation = Input.GetAxis ("Vertical") * speed*multiplier;
bool attack = Input.GetKey (KeyCode.E);

Grounded ();

if (IsGrounded) {

gravity = 0;
moveDirection = new Vector3(straffe,0 , translation);
anim.SetBool ("IsGrounded", true);
canJump = true;

} else {

if (!canJump) {
gravity += 0.1f;
moveDirection = new Vector3(straffe,-gravity , translation);
anim.SetBool ("IsGrounded", false);
}
}



if (canJump) {
if (Input.GetKey (KeyCode.Space)) {
power -= 1;
if (power < 0) {
canJump = false;

}

moveDirection = moveDirection = new Vector3 (straffe, power, translation);
} else {
power = copypower;
canJump = false;

}
}
print (rbody.velocity);

rbody.velocity = moveDirection;

if (translation > 0) {
anim.SetBool ("IsWalking", true);
anim.SetBool ("IsWalkingBack", false);
anim.SetBool ("IsIdle", false);

if (Input.GetKeyDown (KeyCode.LeftShift)) {
anim.SetBool ("IsRunning", true);

multiplier = 2;

}
if (Input.GetKeyUp (KeyCode.LeftShift)) {
anim.SetBool ("IsRunning", false);
multiplier = 1;
}
}else if (translation < 0 ) {
multiplier = 1;
anim.SetBool ("IsWalkingBack", true);
anim.SetBool ("IsWalking", false);
anim.SetBool ("IsIdle", false);
anim.SetBool ("IsRunning", false);
}
else {
multiplier = 1;
anim.SetBool ("IsWalking", false);
anim.SetBool ("IsWalkingBack", false);

if (attack) {
anim.SetBool ("IsIdle", false);

} else {
anim.SetBool ("IsIdle",true);
}
}

if (straffe > 0 || straffe < 0) {
anim.SetBool ("IsWalking", true);
anim.SetBool ("IsIdle", true);

}

if (Input.GetKeyDown ("escape")) {
counter++;
}

}

void Grounded(){
RaycastHit hitInfo;
if(Physics.Raycast(transform.position + (Vector3.up * 0.1f), Vector3.down, out hitInfo, 0.1f))
{

IsGrounded = true;

}
else
{
IsGrounded = false;

}

}


there is no issues with the frames of when i press key down and when it events happens
here is the ground porgram to check if its on the ground
Code: [Select]
void Grounded(){
RaycastHit hitInfo;
if(Physics.Raycast(transform.position + (Vector3.up * 0.1f), Vector3.down, out hitInfo, 0.3f))
{

IsGrounded = true;

}
else
{
IsGrounded = false;

}

}


Thanks, if you need ANY MORE INFORMATION, JUST ASK!, no question is a stupid one. only answers have the possibility to be stupid.

19
Programming / RayCasting At Certain Intervals, C# script INSIDE
« on: July 30, 2016, 22:56:26 »
Currently i have an animation which attacks the player within so many units in its range, only issue is that i have tried to use yield new return WaitForSeconds method. That didn't work out at all.

Code: [Select]
if (direction.magnitude > 1) {
this.transform.Translate (0, 0, 0.05f);
anim.SetBool ("IsWalking", true);
anim.SetBool ("IsAttacking", false);
} else {
anim.SetBool ("IsAttacking", true);
print ("Attacking");
Vector3 fwd = transform.TransformDirection (Vector3.forward);
print ("Attacking");
waiting();// HERE IS WHERE IT DOESNT WORK


/*RaycastHit hitInfo;
if (Physics.Raycast (transform.position,fwd, out hitInfo, 1)) {
if (hitInfo.collider.tag == "Player") {
objectHealth = hitInfo.collider.GetComponent<Health> ();
objectHealth.TakeDamage(0.05f);
}
}*/
anim.SetBool ("IsWalking", false);
}
Here is the waiting function:
Code: [Select]
IEnumerator waiting(){
yield  return new WaitForSeconds(8);
Vector3 fwd = transform.TransformDirection (Vector3.forward);
print ("Attacking");
// waiting(){


RaycastHit hitInfo;
if (Physics.Raycast (transform.position,fwd, out hitInfo, 1)) {
if (hitInfo.collider.tag == "Player") {
objectHealth = hitInfo.collider.GetComponent<Health> ();
objectHealth.TakeDamage(0.05f);
}
}

}

What does work is that commented part. if i comment out the waiting, and uncomment that comment block with the raycast hit stuff, works beautifully, but the health is going down continuously, not periodically. Any help would be appreciated.


20
Programming / Custom Animation, creating them.
« on: July 30, 2016, 21:54:05 »
Hey guys, im back.
im creating a game with a friend of mine thats a survival type. Its mmorpg with unity. Only issue that im seeing is how to create custom animations. I been using mixamo, but sooner or later im gonna have to create my own. Anyone know how to get started on it.

thank you,
Matt

Edit by Nova:
I removed the link to your game, as that could be seen as advertising which is against the rules.

21
if you know how any graphic cards that are great and are worth your money please share.

22
Shinobi Life Online Questions / Community stress tests
« on: March 18, 2015, 19:39:45 »
When will they happen? Will they be happening when there is a major development or when you want to do a test on the server?

update: when?

And that update will be when? it does not have to be an exact date.

Pages: 1 [2]