• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Evsey

  • Rank
    Junior Member

Recent Profile Visitors

210 profile views
  1. I've solved this issue - the blowdarts are flying above the ground because they have their y set to 2, along with an increased hitbox to accomodate for the hovering. Setting the launch offset for the projectile to be above the ground, along with increasing the hitbox, gave me the same effect. This is the two lines needed to make it work: inst.components.projectile:SetLaunchOffset(Vector3(0, 2, 0)) inst.components.projectile:SetHitDist(2)
  2. I'm trying to make my own rideable vehicle in DST, with custom physics where you can accelerate/decelerate and turn left/right, and currently am trying to make it so that you can even simply get in and ride it using the default locomotor physics, for which I tried to use the rideable component. However, after attaching the component and mounting, it's using the animations for beefalo riding along with putting my character up way high into the air, along with making the vehicle invisible. Is there a way to make the character stay in the default animation when riding, along with setting yourself where the character should be? How do I make the vehicle be actually visible when it's being driven? Do I have to write my own riding component for different riding animations and character position during riding? If so, does anyone else already have a component like such that they have already coded? If not, what would be the best way to go about making such component?
  3. I am making a weapon that fires projectiles, and I want the projectiles to hover above ground like blowdarts, but when I fire my projectiles - they simple slide along the ground. How do I achieve the flying effect that blowdarts have? Something I considered is setting the Y of the projectile to something like 1.5, but then it won't collide properly with the target, since everything has a Y of 0, and gravity would affect the projectile. Here is my current code: local assets={ Asset("ANIM", "anim/rpgprojectile.zip"), } prefabs = {} local function onthrown(inst, data) inst.AnimState:SetOrientation(ANIM_ORIENTATION.OnGround) inst.AnimState:PlayAnimation("idle") local x,y,z = inst.Transform:GetWorldPosition() inst.Transform:SetPosition(x,1.5,z) end local function fn() local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("rpgprojectile") inst.AnimState:SetBuild("rpgprojectile") inst.AnimState:PlayAnimation("idle") MakeInventoryPhysics(inst) RemovePhysicsColliders(inst) if not TheWorld.ismastersim then return inst end inst:AddComponent("projectile") inst.components.projectile:SetSpeed(30) inst:ListenForEvent("onthrown", onthrown) inst.components.projectile:SetOnHitFn(inst.Remove) inst.components.projectile:SetOnMissFn(inst.Remove) inst:AddComponent("explosive") inst:AddTag("NOCLICK") return inst end return Prefab("rpgprojectile", fn, assets, prefabs)