Interface IMyMissile
Describes missile entity (mods interface)
Inherited Members
Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common.dll
Syntax
public interface IMyMissile : IMyEntity, IMyEntity, IMyDestroyableObject
Properties
AmmoDefinition
Gets MyAmmoDefinition of missile
Declaration
MyDefinitionBase AmmoDefinition { get; }
Property Value
| Type | Description |
|---|---|
| MyDefinitionBase |
AmmoMagazineDefinition
Gets MyAmmoMagazineDefinition of missile
Declaration
MyDefinitionBase AmmoMagazineDefinition { get; }
Property Value
| Type | Description |
|---|---|
| MyDefinitionBase |
CollidedEntity
Gets collided entity, on missile hit. You should get this value only on OnMissileCollided event
Declaration
MyEntity CollidedEntity { get; }
Property Value
| Type | Description |
|---|---|
| MyEntity |
CollisionNormal
Gets collision normal, on missile hit. You should get this value only on OnMissileCollided event
Declaration
Vector3 CollisionNormal { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
CollisionPoint
Gets collision point, on missile hit. You should get this value only on OnMissileCollided event
Declaration
Nullable<Vector3D> CollisionPoint { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<Vector3D> |
ExplosionDamage
Gets or sets explosion damage for missile
Declaration
float ExplosionDamage { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
ExplosionType
Gets or sets explosion type of missile (changes effect of explosion)
Declaration
MyExplosionTypeEnum ExplosionType { get; set; }
Property Value
| Type | Description |
|---|---|
| MyExplosionTypeEnum |
HealthPool
Gets or sets health of missile. While it is more than 0, it is damaging blocks that it collide with, each time subtracting amount of damage dealt. When left health is less or equal 0, missile explodes (if it hitted anything and ShouldExplode is true).
Declaration
float HealthPool { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
LauncherId
Character EntityId or block EntityId that shoots
Declaration
long LauncherId { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
LinearVelocity
Gets or sets velocity of missile
Declaration
Vector3 LinearVelocity { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
MaxTrajectory
Gets or sets max travel trajectory
Declaration
float MaxTrajectory { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Origin
Get or sets initial position of missile
Declaration
Vector3D Origin { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3D |
Owner
Character EntityId or block EntityId that shoots
Declaration
long Owner { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
ParticleEffect
Gets or sets missile trail particle effect
Declaration
MyParticleEffect ParticleEffect { get; set; }
Property Value
| Type | Description |
|---|---|
| MyParticleEffect |
ShouldExplode
Gets or sets if missile should explode on hit
Declaration
bool ShouldExplode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
WeaponDefinition
Gets MyWeaponDefinition of missile
Declaration
MyDefinitionBase WeaponDefinition { get; }
Property Value
| Type | Description |
|---|---|
| MyDefinitionBase |
Methods
Destroy()
Can't be called in Missiles.OnMissileMoved, MissileCollided
Declaration
void Destroy()
IsCharacterIdFriendly(Int64)
Returns whether player is friendly to missile
Declaration
bool IsCharacterIdFriendly(long charId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | charId | Player identityId |
Returns
| Type | Description |
|---|---|
| System.Boolean | If player is friendly |