ID:170392
![]() Jan 31 2005, 5:25 pm
|
|
I need help with a shaking effect for when a player transforms. Ive tried it myself, but I cant get it to work.
|
![]() Jan 31 2005, 5:26 pm
|
|
It's kinda cheasy...but hey it works =P http://developer.byond.com/hub/AbyssDragon/QuakeEffect
|
nope no good
runtime error: Cannot read null.client proc name: Quake Effect (/proc/Quake_Effect) source file: SSJ System.dm,42 usr: Steve (/mob) src: null call stack: Quake Effect(null, null, 1) Steve (/mob): Raise Anger() is the runtime im getting. line 42 is the code I said on the previous message. |
K here it is, its not completely done, but im trying to get the screen to shake when you transform to ssj for the first time.
mob |
Um...that is not how you use a library. The library includes a file that shows you how to use the library!
|
You need to pass the mob that will see the quake effect into Quake_Effect(). At the moment you're not passing anything to it, so M ends up null, and boom! Error.
|
FiredGoku wrote:
> Quake_Effect(mob/M,duration,strength=1)//not edited one bit If it's not edited one bit, then why is that "if(M.client == 1) return" line there? In the original code, it is: if(!M.client)return |
mob
verb Anger() set name = "Raise Anger" set category = "Commands" var/title2 = "Raise Anger" var/text2 = "What do you wish to raise your anger to? " var/anger_level = input(usr, text2, title2) as text usr.levelanger = anger_level if(usr.levelanger == "10") oview(6) <<"[src.name]'s power increases..." usr <<"[usr.name]: AHHHH!!!!!!! Arrrrrrrrrr..." sleep(30) usr <<"AHHHHHHHHHHH!!!!!!!!" if(usr.powerlevel >= 1000000) if(usr.maxpowerlevel >= 1000000) usr.chancetogossj = (rand(1,2)) if(usr.chancetogossj == 1) Quake_Effect()//here is where it will start to shake usr <<"I won't let you...!!Get away...with this!!ARRRR!!!!" oview(6) <<"[src.name]'s hair begins to glow!" sleep(30) oview(6) <<"Lightning starts to form overhead!" sleep(30) oview(6) <<"The ground starts to rumble and crack!" usr <<"I..WONT..LET YOU!!!" sleep(30) usr <<"AAAAAHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!" oview(6) <<"[src.name] explodes into a ball of light!" sleep(30) if(usr.raceextra == "Royal") view(6) <<"[src.name]: I am the prince of all Saiyans once again!" if(usr.raceextra == "Normal") view(6) <<"[src.name]: I am the hope of the universe! The result of all the innocent lives you stole!" world <<"[src.name] has become a <font color = yellow>Super Saiyan</font>!" else if(usr.maxpowerlevel >= 500000) usr.chancetogossj = (rand(1,50))//not complete yet proc Quake_Effect(mob/M,duration,strength=1)//not edited one bit if(M.client == 1) return spawn(1) var/oldeye=M.client.eye var/x for(x=0;x<duration,x++) M.client.eye = get_steps(M,pick(NORTH,SOUTH,EAST,WEST),strength) sleep(1) M.client.eye=oldeye -- Its not working on my game is saying this error.... get_steps:undefined proc |