Teleport problems

trev0rc
06 Oct 2013, 22:17I'm trying to automatically move the player from one location to another (unconnected) location.
I'm using the command:
move object [object] [player] to [object] [location name]
If I'm not displaying the map then it works fine. But with map display turned on I get an error:
Error running script: Error compiling expression 'room.grid_x + room.grid_width/2.0 + exit.grid_offset_x': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Double'
This then occurs every time I move from the new location with normal move commands.
Am I doing something wrong. Is there a better way of 'teleporting' ?
I'm using the command:
move object [object] [player] to [object] [location name]
If I'm not displaying the map then it works fine. But with map display turned on I get an error:
Error running script: Error compiling expression 'room.grid_x + room.grid_width/2.0 + exit.grid_offset_x': ArithmeticElement: Operation 'Add' is not defined for types 'Object' and 'Double'
This then occurs every time I move from the new location with normal move commands.
Am I doing something wrong. Is there a better way of 'teleporting' ?
HegemonKhan
07 Oct 2013, 00:42I haven't worked with the mapping feature yet, so I can't give a precise answer, but what the error means is this:
your Attribute Types don't match up:
Type: Object <not equal> Type: Double
or, you're missing an Attribute and~or its Object, altogether, ie it doesn't exist. Also, you must type in your Object's and~or Attribute's Name Attributes correctly, as this is used by the quest engine to "ID" (identify ~ recognize) them.
your Attribute Types don't match up:
Type: Object <not equal> Type: Double
or, you're missing an Attribute and~or its Object, altogether, ie it doesn't exist. Also, you must type in your Object's and~or Attribute's Name Attributes correctly, as this is used by the quest engine to "ID" (identify ~ recognize) them.

jaynabonne
07 Oct 2013, 08:41This is a problem with the mapping code. It doesn't work with teleporting. It starts in the room you start in and builds from there. Jumping into a random room confuses it, as the new room has possibly not been laid out yet and so doesn't have any grid variables.
Is this room part of the same contiguous rooms as what you have been in? In other words, can you get to it by normal room movement anyway, or is it a completely different set of rooms?
The only way to solve this would be somehow have code that "visits" all the rooms ahead of time to generate the full layout. I have something like that if you wish, but all the rooms need to be connected somehow so that the entire room set can be visited.
Is this room part of the same contiguous rooms as what you have been in? In other words, can you get to it by normal room movement anyway, or is it a completely different set of rooms?
The only way to solve this would be somehow have code that "visits" all the rooms ahead of time to generate the full layout. I have something like that if you wish, but all the rooms need to be connected somehow so that the entire room set can be visited.

trev0rc
07 Oct 2013, 22:43Ah thanks. I am trying to connect to a different section that is not connected to the first map. Maybe I could put a hidden room as a conduit in order to link the two rooms. With hidden exits ?