The problem was that the underlays and overlays were somehow fucking up a bunch of objects in the game. Not that it was being placed on the opponent. I'm not new to coding dude. U seriously made it the opposite of what it's supposed to be. U made it into an AOE instead of a targeting skill. Basically everything you changed about the code I wrote is wrong.
It does not select a single target. Unless the if(usr.FirstActOn&&M.FirstActUsing) is what does the selecting.

Oview: A list of visible objects within Dist tiles of Center, excluding Center.

This is ALL mobs within 8 tiles excluding the player cause it defaults to the src unless specified differently > mob/M in oview(8)

If you don't think you shouldn't use usr and if you're coding on a rip, you're probably new to coding. If not, why are you still using outdated sources? Start from scratch that way you will know how to pinpoint a issue better because it's your own code.

If you're wanting to add the overlays to both then yes your way was one way of doing it. If that was causing problems then you got a deeper problem within your coding, adding overlays shouldn't be doing what you described it to be doing normally.
Dude, U literally do not know how to code at this point. I've used this method of mob/M in oview literally countless times without problems, always functioning the method I've mentioned. It brings up a list of the people within ur oview, and lets u select who it effects which is the one person u select, which is what its supposed to do. That is how it works. Using usr and src literally does not matter, since they do the same thing. I'm not new to coding, I've been coding on BYOND for over 8 years. I can't start from scratch because I don't know how, and yeah I figured it wasn't the overlays but I changed removed the overlays and its working now, hence workaround. I'm not sure what in the source could be the issue since no errors come up. Also I'm not trying to add overlays to both characters, I'm adding overlays to just the opponent. Btw, the firstacton thing is part of the damage calculation, not the targeting, whatsoever. Btw, I built this skill's code myself, so...I know how it works.
Before posting Uneccessary blanter, i suggest you tone down and stop represent such a negative attitude from yourself.

I've used this method of mob/M in oview literally countless times without problems, always functioning the method I've mentioned. It brings up a list of the people within ur oview


It is basicly exactly as Nero said, so i don't think you read his post thoroughly. As to using usr, what Nero is explaining to you is that it is basicly bad habits, that is originates from bad zeta's

As to the code:
M.underlays += new/obj/ShunsuiShadow
M.overlays += new/obj/ShunsuiBlade
It's nothing like Nero's said. Again, I've used this method of code multiple times and it doesn't create an AOE, but his does. I've used that before specifically to create AOEs. Also, it's not just adding them that's bugged but also subtracting, and this only happens for very specific additions and subtractions of overlays/underlays. Nothing else.
His doesn't.
Casting var/mob/m in oview() as an argument provides with the exact same as you do. his code didn't create an AoE effect, it just cycles through everyone in the oview() list, and affects the one with the right conditions.

But the example doesn't fall under the right circumstances. what it seems like he tried to explain was a way to avoid a structure where you had to interract with a box of which every mob in oview() is, but applies to a set player within oview().

Now, i don't know the code, but i would for sure avoid the usage of verb/example(mob/m in oview())

Now i assume you don't have a target system as of this code you have shown, so i don't think a workaround for that is viable and i would just continue on. However, if you could i would make a targeting system where this code habit would feat uneccessary.
Except those aren't affecting conditions. Ya'll didn't read the code well did u? That specific line of code is for something completely unrelated to the skill aside from damaging purposes.
Sorry, it doesn't come out as the same. But it all comes down to whether you would like to use the interface popup with all the mob's in oview() or not.

using the for-loop and create exceptions to which target to pick would just be more reduntant, and under those terms it wouldn't be an aoe ability.

But it doesn't matter really. do whatever you'd like. I just don't like people who express angry feelings towards tips or suggestions.
Ok so, how about instead of criticizing how I write code and trying to redo my skill (The skill itself is not bugged), how about trying to help me solve the actual issue?
I'm sorry, i am trying to help you. I am not trying to critizise.

And i did say a suggestion to you.
And does it have any debug messages?

I don't think you properly explained what actually appears to be bugged, other then it being related to the objects, overlays and underlays. are you able to describe what actually happens? Is it that it doesn't appear, doesn't get removed etc?

Since you didn't have "new" before the object path i thought it was related to that.
No, I did explain exactly what happens in my original post. The objects overlayed on the user (The swords that are object overlays) weren't flicking when I attack with them, and it stopped (the issue) after I removed those overlays and underlays in that specific skill. I wanna know why they bugged in the first place. I replaced the overlays and underlays with code from a different part of the game and changed the name to what it is in here (right before I posted this), and everything is working fine now. What I wanna know is why it happened and how to prevent it from happening again.
Either it is related to the actual object and it's icon / icon_state. Or how you represent the flick(which in all honesty shouldn't matter. it's supposed to work, unless there is something wrong with the object itself).

Now, i assume you don't have a lot of code on the object itself, i.e variables and procs.
I would guess you could pinpoint the issue yourself by looking at the differences between the code you pasted from an other ability and the original one.
lol I literally just remade the object code, and redid the overlays and underlays, and now its working. Idk what was wrong cuz its basically the same.
I know what you were trying to do, but I was under the assumption you were trying to make it randomly select someone, not do some 2008 rip code and select someone from a default window. We were trying to help you and you resorted to being toxic and telling me I have no idea what I'm talking about lol, I wasn't trying to be rude when I said stay away from rips. I started there and it's never going to get you anywhere. It teaches you bad habits which will hinder your future. Start fresh, have less isssues.
lol If u read the code and understood it why would u try to change it into something it isn't? I thought I said that the code itself works fine? If i didn't then that's my bad, but still. I literally highlighted the area that was bugged and u changed the entire code for no reason.
Page: 1 2