Well after my last Topic about the beam...It is finally in, and I have no errors what so ever, the onlything is it turned out alot larger than what I expected the code to be :)
Anyways, enough of that...
Once it was finished I went to my map file and checked to see if my Icons for the beam were working correctly, and to my suprise, they werent, so I am wondering if anyone knows what the problem is here and if so could you please tel me how to fix it?
Evil_SSJ4Vegeta
ID:261191
![]() Oct 8 2001, 12:01 am
|
|
Alathon wrote:
Were going to need clarification on this. By map what do you mean(map editor/in game?), and if in game: hows the code for the beam currently look Map as in the Editor |
Right the Beam() and the Icons for it are working correctly now, only problem is I made it so that when I start in the game I automatically start with the Beam(), but it doesnt work...no errors or warnings, the Beam() just isnt fireing
This is the code I have used to start off with the Beam(): mob/Login() if(usr.key == "Evil_SSJ4Vegeta") usr:verbs += /obj/items/Ultra_Kamehameha/verb/Ultra_Kamehameha loc=locate(2,2,1) usr << "Welcome!" ..() If anyone knows how to help me *yet again* I would be very thankful Evil_SSJ4Vegeta |
Hmm, I guess ill need to make a snippet of this, this seems to be a big topic among many people, he is the only one to carry it this far. well thats ok, i havnt made a snippet in a while, and my first one sucks, and i forgot to credit, thus ill need to remove it, but ill try to make one by today.
|
Ok thanks, I have carried this on for this long because many of my friends want this beam in my game and nearly all the people who have played my game have asked me to do this also so I said I will have it in, and I'm really interested in having it in my game also, but once this game has a firm ground I will put it on hold an start a new RPG as most of you have heard.
Evil_SSJ4Vegeta |
You can't add object verbs to mobs, as you cant use object variables for mobs.
If its in your contents, it will automatically add itself to your verbs list, unless you specify otherwise. Alathon |
Evil_SSJ4Vegeta wrote:
Right the Beam() and the Icons for it are working correctly now, only problem is I made it so that when I start in the game I automatically start with the Beam(), but it doesnt work...no errors or warnings, the Beam() just isnt fireing This is a bit confusing. You say the Beam() proc works, but it doesn't. Which is it? I notice also that the snippet you posted doesn't include a call to Beam() at all, but just gives the user access to a verb. I can only assume that verb calls the Beam() proc, but this code doesn't show why it isn't working. I think you need to be more specific here. When you say Beam() works, does it actually do what it's supposed to do, or does it merely compile without errors? (The latter doesn't necessarily mean it's "working".) It seems obvious that whatever problem you're having is not in the Login() proc but in Beam(), so why you posted this proc instead, I have no idea. Lummox JR |
Sorry, well when I compile I get no errors or warnings, and yes, I do get the access of the verb but it just wont fire, and its rather making a mess of my head as I cant get round this haunting thing, if you would like I could put down my code in he but it is rather huge, as Alathon would know.
So if you think its best to send you the code by AIM so you know what I have done please tell me as I personally am on the verge of going insane as it gives off no errors but yet, I get the verb, click it, nothing happens, it can be very aggrevating as you think its correct with no errors or warnings, but when testing comes you find out how annoying it really is when you stare ready at your player ready to see his attack, and then find out somethings wrong...it just stands there like a brainless monkey staring back at you laughing its head off. So could someone please help me? As I have been trying this nearly all day and nothing has made any improvements :( Evil_SSJ4Vegeta |
Evil_SSJ4Vegeta wrote:
Sorry, well when I compile I get no errors or warnings, and yes, I do get the access of the verb but it just wont fire, and its rather making a mess of my head as I cant get round this haunting thing, if you would like I could put down my code in he but it is rather huge, as Alathon would know. AIM is not an effective means of communication, I find, especially when it comes to large chunks of code. If it's a lot of code, it's best posted here. Lummox JR |
ok, here is my Beam() code:
--------------------------- //Ki Attacks obj items Electricity icon = 'elec.dmi' obj items blasttop icon = 'turfsfour.dmi' icon_state = "blasttop" density = 1 Enter(O) usr.PL -= 10000000 usr.Die() obj items blastbottom icon = 'turfsfour.dmi' icon_state = "blastbottom" Enter(O) usr.PL -= 10000000 usr.Die() obj items blastmiddle icon = 'turfsfour.dmi' icon_state = "blastmiddle" Enter(O) usr.PL -= 10000000 usr.Die() obj items blastleft icon = 'turfsfour.dmi' icon_state = "blastleft" Enter(O) usr.PL -= 10000000 usr.Die() obj items lblast icon = 'turfsfour.dmi' icon_state = "lblast" Enter(O) usr.PL -= 10000000 usr.Die() obj items rblast icon = 'turfsfour.dmi' icon_state = "rblast" Enter(O) usr.PL -= 10000000 usr.Die() obj items blastright icon = 'turfsfour.dmi' icon_state = "blastright" Enter(O) usr.PL -= 10000000 usr.Die() obj items destroyedleft icon = 'turfsfour.dmi' icon_state = "destroyedleft" density = 0 obj items destroyedright icon = 'turfsfour.dmi' icon_state = "destroyedright" density = 0 obj items destroyed icon = 'turfsfour.dmi' icon_state = "destroyed" density = 0 obj items destroyedtop icon = 'turfsfour.dmi' icon_state = "destroyedtop" density = 0 obj items destroyedleft icon = 'turfsfour.dmi' icon_state = "destroyedleft" density = 0 obj items destroyedbottom icon = 'turfsfour.dmi' icon_state = "destroyedbottom" density = 0 obj items ld icon = 'turfsfour.dmi' icon_state = "ld" obj items rd icon = 'turfsfour.dmi' icon_state = "rd" obj items botom icon = 'turfsfour.dmi' icon_state = "2bottom" obj items tp icon = 'turfsfour.dmi' icon_state = "2top" obj items bottm icon = 'turfsfour.dmi' icon_state = "3bottom" obj items tee icon = 'turfsfour.dmi' icon_state = "3top" obj items Ultra_Kamehameha verb PickUp() set category = "Ki Techniques" set src in oview(1) Move(usr) Ultra_Kamehameha(mob/M in oview(6)) set category = "Ki Techniques" set name = "Ultra Kamehameha" usr.overlays += 'elec.dmi' usr.underlays += 'blueaura.dmi' sleep(10) usr.overlays -= 'elec.dmi' usr.underlays -= 'blueaura.dmi' M.PL -= 1000000 sleep(1) usr.icon_state = "" M.Die() if(usr.dir == 1) if(usr.PL <= usr.MaxPL) usr << "You need to be at your max PowerLevel to use this!" else usr.PL = -2 new /obj/items/lblast(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/blastbottom(locate(usr.x,usr.y+1,usr.z)) new /obj/items/rblast(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+2,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+2,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+2,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+3,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+3,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+3,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+4,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+4,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+4,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+5,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+5,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+5,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+6,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+6,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+6,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+7,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+7,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+7,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y+8,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y+8,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y+8,usr.z)) sleep(20) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+1,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+2,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+2,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+2,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+3,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+3,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+3,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+4,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+4,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+4,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+5,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+5,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+5,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+6,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+6,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+6,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+7,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+7,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+7,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+8,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+8,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+8,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+1,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+2,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+2,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+2,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+3,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+3,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+3,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+4,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+4,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+4,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+5,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+5,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+5,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+6,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+6,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+6,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+7,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+7,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+7,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y+8,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y+8,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y+8,usr.z)) usr.PL = 5 if(usr.dir == 2) if(usr.PL <= usr.MaxPL) usr << "You need to be at your max PowerLevel to use this!" else usr.PL = -2 new /obj/items/ld(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x,usr.y-1,usr.z)) new /obj/items/rd(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-2,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-2,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-2,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-3,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-3,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-3,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-4,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-4,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-4,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-5,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-5,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-5,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-6,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-6,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-6,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-7,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-7,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-7,usr.z)) new /obj/items/blastleft(locate(usr.x-1,usr.y-8,usr.z)) new /obj/items/blastmiddle(locate(usr.x,usr.y-8,usr.z)) new /obj/items/blastright(locate(usr.x+1,usr.y-8,usr.z)) sleep(20) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-1,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-2,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-2,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-2,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-3,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-3,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-3,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-4,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-4,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-4,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-5,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-5,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-5,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-6,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-6,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-6,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-7,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-7,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-7,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-8,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-8,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-8,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-1,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-2,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-2,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-2,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-3,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-3,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-3,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-4,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-4,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-4,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-5,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-5,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-5,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-6,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-6,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-6,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-7,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-7,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-7,usr.z)) new /obj/items/destroyedleft(locate(usr.x-1,usr.y-8,usr.z)) new /obj/items/destroyed(locate(usr.x,usr.y-8,usr.z)) new /obj/items/destroyedright(locate(usr.x+1,usr.y-8,usr.z)) usr.PL = 5 if(usr.dir == 8) if(usr.PL <= usr.MaxPL) usr << "You need to be at your max PowerLevel to use this!" else usr.PL = -2 new /obj/items/tp(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-1,usr.y,usr.z)) new /obj/items/botom(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-2,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-2,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-2,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-3,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-3,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-3,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-4,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-4,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-4,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-5,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-5,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-5,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-6,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-6,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-6,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-7,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-7,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-7,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x-8,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x-8,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x-8,usr.y-1,usr.z)) sleep(20) new /obj/items/destroyedtop(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-1,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-2,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-2,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-2,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-3,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-3,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-3,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-4,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-4,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-4,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-5,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-5,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-5,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-6,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-6,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-6,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-7,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-7,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-7,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-8,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-8,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-8,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-1,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-1,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-2,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-2,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-2,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-3,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-3,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-3,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-4,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-4,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-4,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-5,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-5,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-5,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-6,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-6,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-6,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-7,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-7,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-7,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x-8,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x-8,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x-8,usr.y-1,usr.z)) usr.PL = 5 if(usr.dir == 4) if(usr.PL <= usr.MaxPL) usr << "You need to be at your max PowerLevel t use this!" else usr.PL = -2 new /obj/items/bottm(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+1,usr.y,usr.z)) new /obj/items/tee(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+2,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+2,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+2,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+3,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+3,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+3,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+4,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+4,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+4,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+5,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+5,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+5,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+6,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+6,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+6,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+7,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+7,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+7,usr.y-1,usr.z)) new /obj/items/blasttop(locate(usr.x+8,usr.y+1,usr.z)) new /obj/items/blastmiddle(locate(usr.x+8,usr.y,usr.z)) new /obj/items/blastbottom(locate(usr.x+8,usr.y-1,usr.z)) sleep(20) new /obj/items/destroyedtop(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+1,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+2,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+2,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+2,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+3,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+3,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+3,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+4,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+4,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+4,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+5,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+5,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+5,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+6,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+6,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+6,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+7,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+7,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+7,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+8,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+8,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+8,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+1,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+1,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+1,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+2,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+2,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+2,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+3,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+3,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+3,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+4,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+4,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+4,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+5,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+5,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+5,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+6,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+6,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+6,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+7,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+7,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+7,usr.y-1,usr.z)) new /obj/items/destroyedtop(locate(usr.x+8,usr.y+1,usr.z)) new /obj/items/destroyed(locate(usr.x+8,usr.y,usr.z)) new /obj/items/destroyedbottom(locate(usr.x+8,usr.y-1,usr.z)) usr.PL = 5 mob/proc Die() if(src.Health <= 0) del(src) ----------------------------------- There ya have it, the Beam() All I hope for now is that you can help me out, Evil_SSJ4Vegeta |
Yegads.
That code is about a zillion times more complicated than it needs to be. For starters, you don't need a hundred separate beam objects; just creating one and changing its icon state when created ought to do. Then, in the beam objects, the call to Enter() is totally wrong. As I recall for objects, Enter() is called only when something checks to see if it can enter that object's contents list, like stepping on a turf; even if it was appropriate there, it should be Entered(). It makes more sense to check during New() to see if anyone's at the current location. Also, within this proc you're affecting usr, not the target, and usr would be the person who spawned the beam by using the verb. Onto Beam() itself, you've got repeated statements that modify just one thing, like +1 to +2 to +3 and so on, when a simple loop would do better. (Also, the power level check should go before the direction-dependent code if it at all can.) You're also comparing dir to constants like 1, 2, 4, and 8, when it would be much simpler to compare to NORTH, SOUTH, EAST, WEST, since those will make your code more readable. Frankly I'm surprised you haven't used code closer to what I posted earlier. It would need modification, but it's much simpler and closer to what you're looking for. The code you opted for is buggy, and to call it overcomplicated would be generous. You need to simplify. Lummox JR |
To begin with, any time you find yourself repeating large sections of code over and over, there is always a simpler way to do it. This shouldn't require more than a couple dozen lines at the most if you would do it the way Lummox JR told you in your first thread on the topic.
This section: Enter(O) usr.PL -= 10000000 usr.Die() means that something must Enter the obj. Entering the turf an obj is in is not the same as entering the obj. You don't Enter() objs walking around the map, you enter turfs. Unless you have code that puts things in the obj, this proc will never be called. I usually make a Trigger() proc that is called for all objs in a turf when something enters the turf obj proc/Trigger(O) // Override this proc for objs that // do things when stepped on. By default // do nothing. turf Entered(O) // called when O enters the turf for(var/obj/Obj in src.contents) Obj.Trigger(O) // Obj was Trigger()ed by O ..() // allow other Entered() procs to happen Using usr in Enter() makes it so that no matter what enters the obj, the last player to use a verb will be hurt and possibly killed. If SSJGohanWannabe says "u kick @$$" and a passing sparrow flies into the beam, SSJGohanWannabe will get hit with the damage. |
Shadowdarke wrote:
Using usr in Enter() makes it so that no matter what enters the obj, the last player to use a verb will be hurt and possibly killed. If SSJGohanWannabe says "u kick @$$" and a passing sparrow flies into the beam, SSJGohanWannabe will get hit with the damage. As well he should. :) Hey, maybe it isn't a bug after all. Lummox JR |
Could either of you two help me out alittle more by explaning in more detail please?
Well, erm... could you explain it alittle more in my terms please? As your knowledge on this kind of stuff is way more advanced than mine so if you understand what I mean would it be possible for you to do this? |
Please help, I am really stumped with this and yesto you I may be very thick, which if you call me ths then thats your choice, but I really really need help, and if someone does end up helping me with this and it finally works, then I will be the most happiest person ever, and after that if I can get some Dimes I will gladly donate them to the helper, as I really neede help, so please, please Help me.
(damnit...I'm begging...crud) |
Evil_SSJ4Vegeta wrote:
Please help, I am really stumped with this and yesto you I may be very thick, which if you call me ths then thats your choice, but I really really need help, and if someone does end up helping me with this and it finally works, then I will be the most happiest person ever, and after that if I can get some Dimes I will gladly donate them to the helper, as I really neede help, so please, please Help me. I suggest you go through earlier posts in which people already posted code that would help. I posted an example that's a good starting place, and there should be others. Look over those again and compare to your current code. That may be enough to get you over the hump. Lummox JR |
Evil_SSJ4Vegeta wrote:
Where would they be situated Lummox? If not in this thread, then in whichever other one you brought up. I suggest looking around for your posts on beams, and start from there. Or, you can look for my posts in various forums with the word "beam", which should point you to the right thread. I do use AOL (not as my primary ISP, though), which means people can contact me via AIM when I go in to check my e-mail, but AIM is a really lousy way to send code back and forth. A tiny window is no place to do debugging. This sort of problem is best handled on a forum like this one. I mean no offense here, but it seems to me that your biggest problem, which is causing you to seek help in real-time, is that you don't know how to adapt others' code snippets to fit your programs. I realize this can be difficult for some, but you're going to have to figure out how to take such code and put it into your own game, making the necessary adjustments. This isn't a skill that can be easily taught in real-time any more than on the forum. It's gonna take some real effort to try to get the code to work. However, the good news is that this skill is relatively easy to use once you pick it up, so after adapting one piece of code, others shouldn't look so bad. Lummox JR |
Alathon