1,. No matter what I do, the Spell Score is always higher than the one I specified (say, I put 150000 and it starts aat 300000), does it multiply the score or something?
Danmakufu's spellcard scoring system is bizarre. I do know that if you disable the rating system, the initial spellcard score in game will be 3x what you put in the script for some reason. I don't really know any good way to work around this besides making your own spellcard system...
2.- The next script has no problem, but I wanted to get feedback about the scripting method(I know, not the thread to, but didn't want to open a thread just for this) http://pastebin.com/ASvXf1z7
You want someone to yell at you for scripting stupidly? SOUNDS LIKE A PLAN! Honestly speaking though, it's not too bad. The fact that you have comments really helps with readability. The following points are just opinions -- don't take em as an absolute truth or anything:
1.) So yeah, first point, fix your tabbing. It's not hard to follow the code right now because it's relatively simple and there's a good amount of comments, but when it gets more complex, properly tabbed code makes a huge difference in how easy it is to understand or debug. Here's a
Wikipedia article on indent styles. Most people use some variation of the first example, but what really matters is keeping your tabbing style consistent.
2.) I think you need better names for your variables at the top. Make it more easily identifiable what each thing is. For example, it's obvious that ImgBoss is an image because it's prefixed with Img. However, something like Cut is really vague. The last thing I would expect it to be is a cut-in, honestly, if none of your stuff was commented. These two lines are especially bizarre:
let Layer2 = CSD ~ "\Pic\JackBG1.png";
let BG = CSD ~ "\Pic\JackBG2.png";Why didn't you just name the variables BG1 and BG2? Basically, like my opinion on tabbing, I think you need a more consistent and less ambiguous naming scheme for your variables.
3.) Your handling of the timer sound is really inefficient. If you decide to change the timer of the spell, you'd have to redefine all the conditionals. Why aren't you using
GetTimer?
4.) Your mainTask is doing nothing except calling your fire task. Unless you're planning to add more stuff to the mainTask, this is entirely pointless and you should just call the fire task directly.
5.) Your fire task can be simplified greatly with a loop, specifically an ascent. Also you don't really need to use 4 different ids for the bullets. Here's my revised version that should behave exactly the same:
ascent(i in 0..4){
CreateShotA(1,GetEnemyX,GetEnemyY,10);
SetShotDataA(1,0,1,dir+i*90,0,0,1,24+i);
SetShotDataA(1,60,0,dir+i*90,0,0,1,24+i);
SetShotDataA(1,210,1,dir+i*90,0,0,1,24+i);
SetShotDataA(1,270,0,dir+i*90,0,0,1,24+i);
SetShotDataA(1,440,1.5,rand(0,360),0,0,1,9+i);
FireShot(1);
}Also, I changed rand(0,359) to rand(0, 360). I suppose it doesn't really make too big a difference, but technically you were missing 1 whole degree between 359 and 360 :V
6.) At the very end of your fire task, you have both a wait(1); and a yield; . wait(1) is the same thing as a yield so you're actually yielding twice. This is causing the boss to run that loop once every other frame instead of every frame. If that was your intention, you should probably use wait(2); instead of one wait(1); and one yield;
That's all I can find that bugged me about your scripting style. Honestly though, if you don't plan on collaborating, none of this really matters. All my tips are just to improve readability. If you're going to be writing everything yourself and not sharing it, as long as you can remember what you were doing, it's not really necessary to write clean code. Unless you're making something huge. :derp: