DeeperThought, on Aug 17 2009, 11:25 AM, said:
No offense, but it's obvious you have no clue.
Your code only works if the hitag of the teleporter sprite is 1. I can pretty much guarantee you that the hitag is 0. Even if you set hitag on the sprite, hitag would be 0 in game unless the sprite is a SE or one of the other special effect sprites. I guess you were trying to copy some code you saw where the hitag variable was being used, but it doesn't make any sense here to do that. Just make the thing work without hitag.
Also, you have "spriteid" where you should have "THISACTOR", which means that when the teleporter works it will take the player to wherever the sprite of number spriteid is, which could be anywhere or nowhere, since you didn't set the spriteid variable to anything in the actor code.
Finally, you are setting to actor to its own sector before changing the player sector, which is harmless but dumb.
I thought I was using the hitag for where I was teleporting
to not
from, and if I did at least get that right, then that's exactly how I wanted it since I'm trying to use the same actor for a destination point, but distinguish between them by using hitags. I set sprite ID to the tile number of the TEND actor, I just didn't include it in the block of code....