SphereServer BugTracker - SphereServer
View Issue Details
0002331SphereServerexecutable - genericpublic06-05-14 14:4710-05-14 22:56
Kirofus 
Ben 
normalfeatureN/A
closedno change required 
Win32Windows Server2012
 
 
Not Available
None, DiagonalWalkCheck
None
0002331: t_ship collision detection
I have a custom boat as type t_ship. When I use the default boat movement hardcoded with Sphere, the ship are moving without the players/items (we don't want that :-P)

Ship:
http://www.profania.com/html/Maisons/bateaupirate.html [^]

So I've scripted my own ship movement system, which works, but there is not way to detect the collision and when the ship should stop.

CanSee, CanMove and CanSeeLos always use SRC, so i can't use that from the t_ship item. So my second goal was to use my own system using the Max X, Max Y, Min Y and Min Y and do check using SERV.MAP(X,Y) but there is no property to get the size of the boat.
No tags attached.
Issue History
06-05-14 14:47KirofusNew Issue
06-05-14 20:30XuNNote Added: 0002156
08-05-14 13:01KirofusNote Added: 0002161
10-05-14 22:56BenStatusnew => closed
10-05-14 22:56BenAssigned To => Ben
10-05-14 22:56BenResolutionopen => no change required

Notes
(0002156)
XuN   
06-05-14 20:30   
Are default ships working fine? Be sure they look like this:

[multidef 0]
// Face N
defname=m_small_ship_n
name=Small Ship
nameloc=1116741 // Small Ship
type=t_ship
value=14000
height=3
can=can_i_block
tspeech=spk_ship_cmds

category=Multis
subsection=Ships
description=Small Ship

multiregion=-2,-5,2,5
component=03e4e,1, 4 // tiller.
component=i_ship_hatch_n,0,-4 // hatch
component=03eb2,2,0 // plank
component=03eb1,-2,0 // plank

CanSee/Los isn't mean to movement checks... you must look for terrain and static items. You can retrieve the ship's size from multiregion, generally the higher number represents the longest part of the ship (one of the parts) in this case is 5, so ship's size is 10.
(0002161)
Kirofus   
08-05-14 13:01   
OK, I was able to do what I want using multiregion and Serv.map(X,Y).type :)