Page 2 of 4

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sat Aug 22, 2015 11:54 am
by Tony Li
Hi,

Sorry about the delay. My dog got jumped by a pack at a dog park, and I spent yesterday afternoon at the vet getting him stitched up. He's a tough little guy but the poor thing looks about how you'd expect after a 6-to-1 pile-on.

You can download an updated support package from the Dialogue System Extras page. I also updated the example scene package with a dialogue NPC that changes levels and updated the manual page.

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sat Aug 22, 2015 12:10 pm
by Tony Li
Terry - Here's the ladder script you were asking for. Add it to a GameObject with a trigger collider. I tested it with a trigger collider that was wrapped around a ladder model.

Code: Select all

using UnityEngine;

public class Ladder : MonoBehaviour {
	
	public float climbSpeed = 5f;

	private bool onLadder = false;
	private CharacterMotorC motor;

	void OnTriggerEnter(Collider other) {
		if (other.CompareTag("Player")) {
			if (Debug.isDebugBuild) Debug.Log("Climbing ladder: " + name, this);
			motor = other.GetComponent<CharacterMotorC>();
			onLadder = (motor != null);
			if (onLadder) motor.enabled = false;
		}
	}

	void OnTriggerExit(Collider other) {
		if (onLadder && other.CompareTag("Player")) {
			if (Debug.isDebugBuild) Debug.Log ("Leaving ladder: " + name, this);
			motor.enabled = true;
			onLadder = false;
		}
	}

	void Update() {
		if (onLadder) {
			motor.transform.position += new Vector3(0, Input.GetAxis("Vertical") * climbSpeed * Time.deltaTime, 0);
		}
	}

}

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sat Aug 22, 2015 12:57 pm
by bohnstudios
I hope your dog is ok! Sounds like a pretty rough park. Thank you so much for the updated support package. I just tested it out. I was way off on my attempt, but I learned a lot seeing how you did it. The comments are very helpful too. My mind is blown at the level of support you provide for this asset.

This ladder script is pretty sweet. I'm definitely going to try it out today.

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sat Aug 22, 2015 5:46 pm
by Tony Li
Yup, the mean streets of a cozy East Coast suburb. :-) It was actually at his doggy daycare on a couple acres of wooded hills (don't laugh; I have a day job, no kids, and a bit of disposable income to pamper my two dogs), but I guess mishaps can occur anywhere.

Anyway, I think you should be all set with the Action-RPG stuff, but if you notice any issues, just let me know!

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sun Aug 23, 2015 11:13 am
by terrymorgan
We have a 80 pound German Shepherd 'puppy', she's 'not all there', likes to jump up and scratch her owners. Can't imagine exposing her
to other dogs, She's not aggressive, just nosy. She like boy dogs but tangles with girl dogs.
About a month ago she found a rattlesnake under a fallen tree, I was 10 feet away downhill on a road when I heard it. I ran up and bodily grabbed her, we both tumbled downhill, 'A new game, daddy?' onto the road.

I always have her on a 75-foot rope, chasing deer is also a problem

Here she is having an epileptic fit
https://www.youtube.com/watch?v=NiJADBk5m4o
10 sec

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Sun Aug 23, 2015 2:08 pm
by Tony Li
Cute 'puppy'! 80 pounds is a workout! If I add both my dogs' weights together, they're barely over that. :-)

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Mon Aug 24, 2015 12:40 pm
by terrymorgan
Still getting jitter on the ladder, even if I put it in an almost empty level, like tut_8_9.unity, strange

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Mon Aug 24, 2015 12:47 pm
by Tony Li
As a test, use the Heroine DS prefab supplied with the ARPG Support package. Does she jitter also?

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Tue Aug 25, 2015 10:48 am
by terrymorgan
Yes, she jitters also, you can try it yourself.

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Posted: Tue Aug 25, 2015 8:51 pm
by Tony Li
I see what you mean. It's when you get off the ladder. I'll look into it and see if I can find an answer by tomorrow.