| Blockland Forums > General Discussion |
| What was that one command that lets you change your character's position? |
| << < (2/4) > >> |
| Johnny Blockhead:
Also, I guess you will get a faster response if you post in coding help. |
| Port:
--- Quote from: Advanced Bot on September 08, 2013, 04:33:34 AM ---$somePos = %player.getPosition(); %player.position = $somePos; --- End quote --- Setting %player.position won't do anything. |
| boodals 2:
findClientByName("NAME").player.setTransform("POSITION eg. 15 63 2"); Or if you want a /command function serverCmdTeleTo(%c, %x, %y, %z) {if(isObject(%p = %c.player)) %p.setTransform(%x SPC %y SPC %z);} Note that that isn't admin only. Admin only version: function serverCmdTeleTo(%c, %x, %y, %z) {if(isObject(%p = %c.player) && %c.isAdmin) %p.setTransform(%x SPC %y SPC %z);} If anyone is going to use this in an add-on, make sure to fully define the transform of the player (with axis rotation). I dont think you have to, but it might rotate you funnily each time otherwise. |
| Port:
--- Quote from: boodals 2 on September 08, 2013, 09:36:09 AM ---I dont think you have to, but it might rotate you funnily each time otherwise. --- End quote --- It would just default to "0 0 0 1". |
| Xalos:
--- Quote from: Port on September 08, 2013, 05:54:29 AM ---Setting %player.position won't do anything. --- End quote --- It does work, actually. It's a stupid way to do it and you SHOULDN'T do it that way, but it does work. |
| Navigation |
| Message Index |
| Next page |
| Previous page |