Author Topic: C++ Tutorials and Stuffers  (Read 2453 times)

That's not what I meant.
What he means is that you should just learn torque.

Learn PHP
PHP is somehow related.

EDIT: asdf. Firefox opens php files unless there online.
I know PHP.

Learn PHP
PHP is somehow related.

EDIT: asdf. Firefox opens php files unless there online.
Idiot.

They are really similar.
No they're not.

No they're not.

Actually I'm pretty sure he's right. Isn't Torque built off C++?

EDIT: That or C#.

Actually I'm pretty sure he's right. Isn't Torque built off C++?

EDIT: That or C#.
It's C#, sorry everyone lol

Actually I'm pretty sure he's right. Isn't Torque built off C++?

EDIT: That or C#.
Nope. None of them. Absolutely not C#.
For example, TS has different prefixes for different scopes (lol), and no real support for arrays, so multidimensional arrays are pretty much guarantueed to give problems. And that's just some of the differences.

Nope. None of them. Absolutely not C#.
For example, TS has different prefixes for different scopes (lol), and no real support for arrays, so multidimensional arrays are pretty much guarantueed to give problems. And that's just some of the differences.
Obviously they have differences since they aren't the same language.  But I've looked at both C and Torque and they are similar in alot of ways.

The engine itself is made in C++, but TorqueScript is its own scripting language, not C# or C++

Learning a second language is easier because you already understand the basic concepts of programming, and you only need to learn things specific to the new language, like syntax.
If you already know PHP, then you already understand the basic concepts, and should just go straight to TorqueScript.

The engine itself is made in C++, but TorqueScript is its own scripting language.

Learning a second language is easier because you already understand the basic concepts of programming, and you only need to learn things specific to the new language, like syntax.
If you already know PHP, then you already understand the basic concepts, and should just go straight to TorqueScript.
I know:

HTML
PHP
BASIC
Lab View

So just go straight to TorqueScript then.

Well instead of making a new thread for this can someone help me with Javascript? I've been working on THIS for the past two days and last night I started experimenting with raycasts. As of the moment when you go to a door and press the use key it will play a locked door sound (not updated in web player). The problem with this was the raycast check I was doing made it so you had to be perfectly centered with the door.

To fix this I tried CapsuleCast and SweepTest with both failed results. As a temp fix I'm just casting a stuff load of raycasts.

Code: [Select]
var Locked : AudioClip[];
var hit = 1;

function Update () {
if (Input.GetButtonDown("Use")){
if (Physics.Raycast (transform.position, Vector3.right , hit) ||
Physics.Raycast (transform.position+Vector3.forward * 0.6, Vector3.right , hit) ||
Physics.Raycast (transform.position-Vector3.forward * 0.6, Vector3.right , hit) ||
Physics.Raycast (transform.position+Vector3.forward * 0.3, Vector3.right , hit) ||
Physics.Raycast (transform.position-Vector3.forward * 0.3, Vector3.right , hit) ) {
AudioSource.PlayClipAtPoint(Locked[Random.Range(0,Locked.length)], transform.position);
}
    }
}

Can someone make fix this up for me or explain how to use CapsuleCast?

HTML
Are you kidding me?
PHP
Maybe.
BASIC
That's pretty vague.
Lab View
Hahahaohwow


Well instead of making a new thread for this can someone help me with Javascript? I've been working on THIS for the past two days and last night I started experimenting with raycasts. As of the moment when you go to a door and press the use key it will play a locked door sound (not updated in web player). The problem with this was the raycast check I was doing made it so you had to be perfectly centered with the door.

To fix this I tried CapsuleCast and SweepTest with both failed results. As a temp fix I'm just casting a stuff load of raycasts.

Code: [Select]
var Locked : AudioClip[];
var hit = 1;

function Update () {
if (Input.GetButtonDown("Use")){
if (Physics.Raycast (transform.position, Vector3.right , hit) ||
Physics.Raycast (transform.position+Vector3.forward * 0.6, Vector3.right , hit) ||
Physics.Raycast (transform.position-Vector3.forward * 0.6, Vector3.right , hit) ||
Physics.Raycast (transform.position+Vector3.forward * 0.3, Vector3.right , hit) ||
Physics.Raycast (transform.position-Vector3.forward * 0.3, Vector3.right , hit) ) {
AudioSource.PlayClipAtPoint(Locked[Random.Range(0,Locked.length)], transform.position);
}
    }
}

Can someone make fix this up for me or explain how to use CapsuleCast?
This is probably more of Unity help than JavaScript help. Either way it's off-topic.

This is probably more of Unity help than JavaScript help. Either way it's off-topic.

Eh sorry just trying to save off-topic from another thread.

So just go straight to TorqueScript then.
Don't want to make stuff in torque, read OP

Are you kidding me?Maybe.That's pretty vague.Hahahaohwow

This is probably more of Unity help than JavaScript help. Either way it's off-topic.
Still valid languages.

Don't want to make stuff in torque, read OP

Hey I was wondering if any of you torquescript experts studied C in order to get a handle on torque?
Then why did you include that bit? You made several people think you did.