i can work around this but whats the right way to make it so this doesnt happen.
Jul 27 2015, 8:43 pm
|
|
Gonna need to see code. This shouldn't be happening.
|
In response to Ter13
|
|
its always happened sense i started my project.
all i do is player1.loc=move(locate(1,1,1)) player2.loc=move(locate(1,1,1)) to work around this ive done player1.density=0;player1.loc=move(locate(1,1,1)) player2.density=0;player2.loc=move(locate(1,1,1)) player1.desnity=1;player2.desnity=1 but now that is getting anoying and i want to find the actual problem |
In response to Ter13
|
|
wait a second whie searching all instances of cross i may have come across something. just a minute, its useless code as well
|
In response to Ter13
|
|
nope didnt fix it
|
What is move()? It's not a BYOND proc. You're setting the players' loc variables to the return value of some "move()" proc, so it's possible that the locs are being set to something that isn't a loc.
However, there shouldn't be any deletions happening. |
Move(NewLoc,Dir=0,step_x=0,step_y=0)
from the byond references. thats the move im using. |
In response to DanteVFenris
|
|
According to the Reference, Move() returns a number. You're setting your players' locs to numbers! What do you make of that?
|
Kaiochao nailed it. You shouldn't be setting loc to the return value of Move() which is 0, 1, or the number of pixels moved in a slide.
player1.density = 0 |
ahh that worked, yea my degree of what ive learnt has changed quite a bit from begining to end. So when i have to work on something earlier it sometimes is done weirder. Just changing the loc to my desired location and not using move fixed everything
|
In response to Ter13
|
|
oh okay i havent used move in a long time but i thought it moved to a location. but thanks guys appreciate it!
|
In response to Ter13
|
|
now that thats done, all my social features are not broken. Like you can still duel and add your enemy to your party while doing a pvp areana type thing but meh its not going to hurt anyone if i ignore it.
|
In response to DanteVFenris
|
|
movable.Move(Location) moves movable to Location. If successful, movable.loc equals Location afterwards, and the entire statement movable.Move(Location) is seen as a positive number.
movable.loc = movable.Move(Location) sets movable.loc to movable.Move(Location), which, after successfully doing the move, is seen as a positive number. player1.loc = player1.Move(locate(1, 1, 1)) That is how the return value of procs works. It's the same as in this example: mob That line, src << Poop(), becomes src << "poop" after Poop() returns. |
Alternately, you can use a proc I'm quite fond of: ForceMove()
It completely ignores density and Enter()/Exit() functions and just calls Exited()/Entered() atom/movable |