Jump to content


Photo

Teleport command


8 replies to this topic

#1 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 27 June 2018 - 09:42 AM

As a developer, I sometimes have to get to a prescribed place immediately after the game starts.

Currently I do it by adding a hack into the code and recompiling, but having a console command would be nicer and more useful.

 

The idea is to have a command which teleports player to prescribed coordinates, e.g.:

teleport 11280 -5664 -6108

Perhaps someone have heard of any such command?

 

If there is no such command currently, then do you think adding such command is a good idea?

Are there any alternative versions of input which would be useful to mappers?

 

P.S. I can also add a command which will show current coordinates in console.

It can probably make it easier to beta-test maps (unless author moves rooms), because testers can send player coords when reporting an issue.



#2 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8980 posts

Posted 27 June 2018 - 09:58 AM

Yeah. The current "teleport" command only accepts an entity location. Extending it to accept raw coordinates would be cool.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#3 grayman

grayman

    Master Builder, Coder

  • Active Developer
  • PipPipPipPipPip
  • 12676 posts

Posted 27 June 2018 - 11:29 AM

Good features.



#4 Abusimplea

Abusimplea

    Member

  • Member
  • PipPip
  • 460 posts

Posted 27 June 2018 - 11:57 AM

The coordinates display would help a lot when reporting bugs while betatesting. Would prefer a toggle as we already have for FPS.



#5 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8980 posts

Posted 27 June 2018 - 12:12 PM

The coordinates display would help a lot when reporting bugs while betatesting. Would prefer a toggle as we already have for FPS.


To show your current position while playing:

g_showviewpos 1
con_noPrint 0
  • Abusimplea likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#6 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1560 posts

Posted 27 June 2018 - 01:10 PM

Have you tried "origin 11280 -5664 -6108"? I vaguely remember having problems teleporting some entities in a map and this could be solved by setting the origin to the desired coordinates. Not sure, if this can be applied here, though.



#7 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 27 June 2018 - 09:29 PM

Ok, I looked into the code:

 

Command origin does not exist.

Command teleport surely works only with location name.

 

There are commands getviewpos and setviewpos, which do exactly what I want.

getviewpos (having a alias where) prints your coordinates and yaw.

setviewpos accepts coordinates and optionally yaw angle and puts you to that location.

 

This is enough for now, I think.

Maybe I'll change this a bit for testing system, if I ever get to it.



#8 Destined

Destined

    Advanced Member

  • Member
  • PipPipPip
  • 1560 posts

Posted 28 June 2018 - 12:50 AM

Ah, sorry; I just rechecked and the comand was "setOrigin(vector origin)" and can be found on the TDM Script Reference Wiki page. In this list "teleportTo(entity other)" exists as well as "setOrigin(vector origin)".


  • stgatilov likes this

#9 stgatilov

stgatilov

    Lead Programmer

  • Active Developer
  • PipPipPip
  • 1017 posts

Posted 28 June 2018 - 10:52 AM

Ah, sorry; I just rechecked and the comand was "setOrigin(vector origin)" and can be found on the TDM Script Reference Wiki page. In this list "teleportTo(entity other)" exists as well as "setOrigin(vector origin)".

But these commands exist in scripting engine.

Can I invoke then in game console?





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users