Hello, I would like to ask you for a help.
I need to get CargoPlane itemcontainer(airdrop) entity in
void OnEntitySpawned(BaseEntity entity)
{
}
method. Thanks in advance.
Hello, I would like to ask you for a help.
I need to get CargoPlane itemcontainer(airdrop) entity in
void OnEntitySpawned(BaseEntity entity)
{
}
method. Thanks in advance.
var cargo = entity as CargoShip;
if (cargo == null)
return;
// TODO entity as SupplyDrop;instead of entity as CargoShip. I think you can access .inventory there void OnEntitySpawned(BaseEntity entity)
{
}
void OnEntitySpawned(BaseEntity entity)
{
if (entity is CargoPlane)
{
var plane = entity.GetComponent<CargoPlane>();
var ent = plane.GetComponentInParent<SupplyDrop>();
var location = plane.dropPosition;
BaseEntity marker = addMarker("Air-drop", location);
planes.Add(marker, ent);
}
}