Ok I'm not new to coding but this is something I have rarely been asked to, or have done.
How would one go about creating a projectile that hits other mobs if they are close enough not accounting for the mob that created it, then having it not hit a mob Twice? Like a chained spell? It seems pretty complex to do and I have been unable to find a solution by myself.
Please dont post a link to a demo seeing as I am on a phone...
ID:156134
Dec 20 2010, 11:05 am
|
|
In response to CauTi0N
|
|
Your example is flawed, for each player, it will walk towards them. you need it to pick a player and continue, get to the new player and do it again.
|
In response to Pirion
|
|
Fixed.
|
In response to CauTi0N
|
|
Thanks, only problem is it doesn't recognize "M" in;
if(istype(hit,/mob)) & M != src.owner
|
In response to Thelavaking
|
|
Excuse me, that M should be "hit". :)
|
In response to CauTi0N
|
|
Ehhh.. not to be a noob or a buggart, but I cannot seem to get a verb to spawn the projectile, it seems to fly through things no matter how I imput it..
|
In response to Thelavaking
|
|
Set density=1.
|
Player A shoots a projectile at Player B. Player C is within 3 tiles of Player B, Player D is within 3 tiles of Player C, and Player E is 10 tiles away from everyone.
Now, you would need to set a maximum amount of times the projectile can bounce - if infinite, you must respect the fact that this can go on for quite some time - if the beam were to diminish, then you might set it at a chain of 3 atoms before going away.
The projectile should therefore have 2 variables - the owner, and a list of hits.
Next, when the projectile Bump's another player, it must add that player to it's hit list, and see if it should move on to another player.
Of course, I'm not at home either so I cannot really come up with a mock system but this should put you on the right track.