Page 6 of 6

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 4th, 2011, 9:48 pm
by iCYsoldier
Can we maybe start a new thread with a defined format? So multiple people can post their code and learn from each other.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 4th, 2011, 10:00 pm
by Drofder2004
My problem with this entire idea is that we are teaching coding to someone who has yet to learn the basics of coding.

The order of what needs to happen should NOT start with coding itself, it should be soemthing like:

- Learning to compile/run the code
- Learning to retrieve errors (developer & console)
- Learning the code syntax (semi-colons and parantheses usage)
- Learning other syntax (such as variable naming conventions and rules)
- Learning the important keywords

All of that is what I would say is important to learn BEFORE your first code is completed.

At the moment we are throwing exercises around, the problems are attempted, we then correct with explanations on how to do the exercise and then we move on... the same exercise should be repeated with small changes and completed succesfully before the next idea is started.

As 'teachers' we are all out of our depth, and as such we are putting those learning out of their depths.

I would be willing to do a bigger, better "Scripting for dummies" thread with more info, but the amount of people willing to read and learn from it, would be few.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 12:21 am
by BeZZo
iCYsoldier wrote:Can we maybe start a new thread with a defined format? So multiple people can post their code and learn from each other.
That.
On a side note, I tried to "solve" a couple of these exercises, and like Ryan I realized that i have completely no idea what of i'm doing :(

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 1:14 am
by Drofder2004
BeZZo wrote:
iCYsoldier wrote:Can we maybe start a new thread with a defined format? So multiple people can post their code and learn from each other.
That.
On a side note, I tried to "solve" a couple of these exercises, and like Ryan I realized that i have completely no idea what of i'm doing :(
See previous post.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 4:10 am
by megazor
I think it would be good if experienced scripters like drofder, rezil, iznogod described how they were learning coding. This might help ryan and other people who want to code well.

I will be first :-)

So,
I started from CoD Radiant. When i opened it for the first time (summer 2009), it seemed so difficult... I then tried to map, but failed at that and removed Radiant. In a few weeks I reinstalled it, read some tutorials more carefully than I did before, put a few questions to mappers I had on Xfire - and I finally managed to create my first map. But then I wanted to add some moving things to my map. This was when I faced coding the first time. Taking finished code from modsonline.com, my first script was "made". Just after that, I started learning how to code. I was pretty often asking coders, but my main method of study was simple reading finished scripts, which CoD was full of (and so were custom maps). bit by bit, I was improving my coding.

Thereby I think we should keep leaving code here.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 6:53 am
by iCYsoldier
One thing I'd like to know is, how many of you have programming experience with other, more common languages? I personally, have been using Java for 1-2 years, making it easier to move onto QuakeC. All the exercises above, I managed to do quite easily, but there are still differences between the language I know and this one, which I'm hoping to learn from a thread like this.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 2:57 pm
by Ryan
i'd like to learn it as quickly as possible but only related to CoD1 so teleports and these sorts of things...

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 5th, 2011, 6:54 pm
by Drofder2004
I started Coding using VBA (Excel & Access) for projects and then moved to VB6.
From VB6 to C/C++ and CoDScript. Have also dabbled with Python, VB.net, Javascript, CSS, HTML, and a few other little things.

Most code was originally learned through mapping (moving objects).
I then moved to making mini-mods (nothing serious). I then moved on to helping and eventually taking over the CoDJumper Mod.

Most valuable source of information = IWNation and the members there (before it became politics).
ModsOnline.com held a lot of basic information.
Asking many questions and getting involved in scripting topics.
Ryan wrote:i'd like to learn it as quickly as possible but only related to CoD1 so teleports and these sorts of things...
Possible is the keyword. Learning quickly is possible, but you must still start from the bottom.
You could simply copy what we type and try and remember it (school style learning) or you can take your time and learn it properly (by understanding).

When you learn without understanding, you end up forgetting what you learn just as quick.

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 6th, 2011, 3:02 pm
by waywaaaard
Some VB6 to Java, C, C++ and lately a lot of C# and .net environment, also some ASM, VHDL and some languagess for SPS-Programming. Helps quiet a to understand the most of the stuff :)

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 6th, 2011, 4:57 pm
by Ryan
how do you use scripts at all... if i put them into a pk3 file where there are other scripts, how do i execute my custom one there?

Re: The 'QuakeC lessons' thread[prev. help with script telep

Posted: May 6th, 2011, 5:04 pm
by Rezil
If you're a mapper, you could make a small testing map and save your code as mapname.gsc, which executes when a map loads.
If you only mod, you have to link it to an existing gametype/map script. Save it as whatever.gsc, then add this line somewhere:

Code: Select all

*path in pk3*\*gsc name*::*function to execute*;
For example:

Code: Select all

maps\mp\_load::main();
will call the .gsc load from pk3\maps\mp\ and execute the function main().