i want to make the sword face away from the player and appear around him in a circle, as if he is spinning around.
But the sword faces wierd directions.
here is my coding
verb
Slash(mob/M as mob)
set category = "Combat"
var/obj/A = new/obj/combat/sword(get_step(usr,EAST))
A.dir = EAST
sleep(1)
del(A)
var/obj/B = new/obj/combat/sword(get_step(usr,NORTHEAST))
B.dir = NORTHEAST
sleep(1)
del(B)
var/obj/C = new/obj/combat/sword(get_step(usr,NORTH))
C.dir = NORTH
sleep(1)
del(C)
var/obj/D = new/obj/combat/sword(get_step(usr,NORTHWEST))
D.dir = NORTHWEST
sleep(1)
del(D)
var/obj/E = new/obj/combat/sword(get_step(usr,WEST))
E.dir = WEST
sleep(1)
del(E)
var/obj/F = new/obj/combat/sword(get_step(usr,SOUTHWEST))
F.dir = SOUTHWEST
sleep(1)
del(F)
var/obj/G = new/obj/combat/sword(get_step(usr,SOUTH))
G.dir = SOUTH
sleep(1)
del(G)
var/obj/H = new/obj/combat/sword(get_step(usr,SOUTHEAST))
H.dir = SOUTHEAST
sleep(1)
del(H)
var/obj/I = new/obj/combat/sword(get_step(usr,EAST))
I.dir = EAST
sleep(1)
del(I)
ID:148000
Aug 16 2003, 1:22 am
|
|
Xallius wrote:
verb Well I think i might of found the problem in here, when you say : <code> var/obj/A = new/obj/combat/sword(get_step(usr,EAST))</code> , you are just making any object A make it something like ,<code> var/obj/combat/sword/A = new/obj/combat/sword(get_step(usr,EAST))</code>, I think that might work if it doesn't page me and i'll work on it. |
In response to FinalFantasyFreak
|
|
Shouldn't make any difference, FFF.
Xallius, what's the actual problem? What do you mean by "weird directions"? |
Well, you're using too many vars, and you've got a big chunk of repeated code that could be done easier in a loop. Those aren't the problem, though; the problem is you never set the sword's dir var.
But instead, try this: verb Lummox JR |
In response to The mothball
|
|
the swords are facing different angles, some out, some in, some down... etc.
|
2. instead of sleep(1);delwhatever, do this:
3. what is it doing wrong?