From now on, i am gonna look at scripting errors and fixes and put them here. Cause lately, i have seen many noobs posting the same error over and over again. It would be great if this ever get's stickied. But let's get this done. So, if you, the users of the forum, or I fix errors, they will get put here. Later, when i have enough, i will still update this, but i will remove these sentences and remove the [WIP] in front.
1. Am i capable of making a CS ?
Spoiler below!
A question you should ask yourself when beginning creating custom stories for the FIRST time!.
How good are you at scripting and mapping? That will determine what level of difficulty there is to do anything.
If you are completely noobish at scripting, then you better look at tutorials before you attempt to do anything scripting related, and then practice your syntax and stuff without getting too complicated in your attempts. Trust me, scripting, is not an easy task, mind you, and it took me a lot of time to understand what I was doing and clean up my scripting.
You should always start small. Open up a map that Frictional Games map. Look at how they laid out their map. Then, make a room in the LevelEditor. Don't add any scripting things, just make a room and get it playable so you can move around and interact with objects. Just try to make a great atmosphere.
When scripting, the same principle applies. Think small scale for the beginning. Make a key that can open a door. Have a door that slams shut when you approach it, etc. They are not hard to implement, you just need to know how to begin. You'll receive a lot of errors when scripting, it's natural, you just have to know how to debug them. We can help with that.
Check the Frictional Games wikifor some tutorials. I'll link a few handy ones that I like:
This is an error mostly comes. But what does it mean? It will always display the last line of the code. And this can be really hard to find in a huge script. Lets pick a example script. Where the problem is at.
I chose it from this thread.
HEY! What is the problem of the code?!
Oh, hey sorry, haha. The problem of this code is mostly a missing " at the end of a name. For example. There is a " missing at line 11. But it displays line 18 on here! That's cause it can't find the end of it! So it snaps to the last line of code to find the ending ".
If it gives this error, it's pretty obvious, the game does NOT know when to activate the script, so it doesn't work. Lets create one when it activates at a script area!
Put a script area in your map with your own specified name.
I have given mine a simple name; Area1
Now, lets Script it, in void OnStart() { edit/enter the code this way!
And, save and start, it works now!
I will not paste the code here, because Typing will let you learn.
Wow, this editor keeps screwing things up! It keeps adding [align=webkit-auto] and everywhere!
(This post was last modified: 05-31-2012, 01:57 PM by Stepper321.)
(05-24-2012, 04:12 AM)Putmalk Wrote: I like the ideas of these threads. But the problem is, when they're lodged into sub-forums, will the people who need to see them actually see them?
I have no idea, but this is not for the Develepmont support. This is for help, so it has to be in the articles. It would be great tough if this was in the Development support.