View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002331SphereServerexecutable - genericpublic06-05-14 14:4710-05-14 22:56
ReporterKirofus 
Assigned ToBen 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionno change required 
PlatformWin32OSWindows ServerOS Version2012
Product Version 
Target VersionFixed in Version 
Summary0002331: t_ship collision detection
DescriptionI 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.
TagsNo tags attached.
Nightly VersionNot Available
Experimental FlagsNone, DiagonalWalkCheck
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0002156)
XuN (developer)
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 (reporter)
08-05-14 13:01

OK, I was able to do what I want using multiregion and Serv.map(X,Y).type :)

- Issue History
Date Modified Username Field Change
06-05-14 14:47 Kirofus New Issue
06-05-14 20:30 XuN Note Added: 0002156
08-05-14 13:01 Kirofus Note Added: 0002161
10-05-14 22:56 Ben Status new => closed
10-05-14 22:56 Ben Assigned To => Ben
10-05-14 22:56 Ben Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker