Hi, i am a complete noob when it comes to scripting in RPG Maker VX, or any kind of programming really... Still, I like to pretend i can learn stuff from time to time, so i decided to follow these tutorials, and so far they have been a big help. SO THANKS!
At the moment I am at tutorial 5, and like I do with all tutorials I start fiddling around with code you provided. now first I would like to state that a piece of your code in tut 5 appears to contain a mistake. Or maybe I made the mistake... but it appears exactly the same as yours
' adjusted_steal_rate = [steal_rate * lv,100].max ' it should return the steal chance wich can't be higher than 100, however at present it appeartly is always 100, even after you set the steal_rate to 1... or atleased that is what my print command tells me. (I am noob, so I don't actually know if it should work or not)
ofcourse using and simple 'if' to to change all value above 100 to 100 will fix this... but clearly you where trying to teach us a quicker way... and I don't get it...
Anyway, that wasn't actually why I decided to post a message, I am perfectly fine using 'if', I just thought i'd mention it since it did take me about halve an our figuring out why, even at a low steal_rate, I always seemed to be able to get a potion. (no, I am not THAT lucky!)
so... my real question. How do you increase an actors 'steal level'?
in the tutorial you mentioned increasing it manually... but never really specified HOW...
if have been busting my head trying to figure it out myself, at first I though, well the level up function is basically just this:
@level += 1
-maybe it works for me too!
just change 'level_up' to 'steal_lv_up' and '@level' to '@Steal_lv' and where all set, right?
nope! 'undefined methode '+' for nill:nillClass!'
translation? I assume; "lol! can't add to nill noob!"
(probs, because it doesn't specify an actor... altough I can't find the point where 'def level_up' would have its actor specified... so maybe its not even that... but even if it is, I can't find it and therefor I can't copy it.
so then I though.. ill just make my own class! always fun... right?
new_steal_lv = Game_Actor.setup(actor_id)::steal_lv + 1
Game_Actor.setup(actor_id)::steal_lv = new_steal_lv
simple, but it seemd logical to me... but appearently I am alone in this... that error was someothing along the lines of 'setup' is not an methode of Game_Actor... damn
even tried to chang setup to self.setup... but anyway.... it took me an hour or three... but I finially came to the conclusion, this is probally simple... but still far beyond me!
so if anyone can give me a hand... this noob can start pretending to learn again... well... not today, i have had my share of 'rejections' for one day... but soon!
This post has been edited by Molach: Jan 24 2012, 07:55 PM