Action RPG Starter Kit - DSTeleporter.cs Script

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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);
		}
	}

}
bohnstudios
Posts: 68
Joined: Sun Aug 16, 2015 3:01 am
Location: St. Louis, MO
Contact:

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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!
terrymorgan
Posts: 97
Joined: Wed Sep 10, 2014 5:29 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post by Tony Li »

Cute 'puppy'! 80 pounds is a workout! If I add both my dogs' weights together, they're barely over that. :-)
terrymorgan
Posts: 97
Joined: Wed Sep 10, 2014 5:29 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post by terrymorgan »

Still getting jitter on the ladder, even if I put it in an almost empty level, like tut_8_9.unity, strange
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post by Tony Li »

As a test, use the Heroine DS prefab supplied with the ARPG Support package. Does she jitter also?
terrymorgan
Posts: 97
Joined: Wed Sep 10, 2014 5:29 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post by terrymorgan »

Yes, she jitters also, you can try it yourself.
Attachments
ladder_arpg.zip
(11.83 KiB) Downloaded 160 times
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Action RPG Starter Kit - DSTeleporter.cs Script

Post 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.
Post Reply