Page 1 of 1
					
				Spider-vehicle surface teleport
				Posted: Tue Aug 25, 2020 12:49 pm
				by PyroFire
				Cars can be teleported between surfaces (because they can contain players), but the spidertron cannot.
.. Why?
			 
			
					
				Re: Spider-vehicle surface teleport
				Posted: Tue Aug 25, 2020 1:29 pm
				by x2605
				Yep. I also don't know why... I guess it is not prepared "yet".
But you may can "teleport" that via
- Check existing spider-vehicles with LuaSurface::find_entities_filtered at around of destination position in destination surface.
- Do LuaSurface::clone_entities for teleporting spider-vehicle.
- Check whether it is successfully cloned finding LuaEntity of it using LuaSurface::find_entities_filtered at destination again and compare with array firstly got. (Because clone_entities function doesn't return any values.)
- Do original_spider.set_driver(nil) or .set_passenger(nil) to eject character from it.
- .destroy() the original_spider.
- Teleport character to position of cloned spider.
- Do cloned_spider.set_driver(player) or .set_passenger(player) to restore.
.unit_number or LuaEntity pointer stored in other variables will not identical to original spider, but you may can register them again after cloning it.
			 
			
					
				Re: Spider-vehicle surface teleport
				Posted: Tue Aug 25, 2020 1:33 pm
				by boskid
				This was already implemented and will be released with 1.1
			 
			
					
				Re: Spider-vehicle surface teleport
				Posted: Tue Aug 25, 2020 2:59 pm
				by Rseding91
				boskid wrote: Tue Aug 25, 2020 1:33 pm
This was already implemented and will be released with 1.1
 
Teleporting was, cross-surface teleport hasn't been done (yet).
 
			
					
				Re: Spider-vehicle surface teleport
				Posted: Tue Aug 25, 2020 3:16 pm
				by boskid
				Rseding91 wrote: Tue Aug 25, 2020 2:59 pm
Teleporting was, cross-surface teleport hasn't been done (yet).
 
My mistake!
 
			
					
				Re: Spider-vehicle surface teleport
				Posted: Thu Aug 27, 2020 9:57 am
				by PyroFire
				Figured as much. It's brand new!
Amazing addition, really changes the end game.
For the moment i just boot players out of their spiderbot and clone like a regular entity which works reasonably.
I could do some tracking to find the cloned bot and re-insert the player but, with spiderbots being a vehicle, they should probably be treated more closely like a car.