Modding Help Collision Ignoring Projectile

Discussion in 'Starbound Modding' started by Riuny, Dec 18, 2014.

  1. Riuny

    Riuny Big Damn Hero

    I've put some good measure of time to find a way to get it work but, sadly I couldn't find one. So I'm calling for help.

    Q : Is there a way to make a projectile that completely ignores any kind of collision?(npc, monster, platform, block, etc.)
     
  2. AstralGhost

    AstralGhost Pangalactic Porcupine

    Well, what you're really wanting is called a 'Particle', not a projectile.
    Particles can be spawned by weapons and projectiles and do not have any collision or other effects. They are just graphics.
     
  3. Riuny

    Riuny Big Damn Hero

    Well, I know I can use particle instead of projectile to make this feature happen. But the problem is that I want it to stay in steady position(relative to the player's position) and only triggered when certain tech is active. For triggering, I think I can handle that. However, I don't know how to make particle to be spawned only once and follows the player until its animation makes a loop.
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    I don't think you can make projectiles follow anything. Homing missles are not actually projectiles but monsters which look like rockets - track another enemy and spawn a projectile on death which causes damage. Projectiles by them selves simply follows a set path which is manipulated by physics.

    The only way for anything to follow something is it runs code to do so. The only things which can run code are entities.
    So you just have to make the Wisp ( I am guessing you want a wisp like object ) to be a monster which follows the character and do as you need.

    Though I don't think you can track the characters animation loop. At least from what I have seen so far.
     
  5. Riuny

    Riuny Big Damn Hero

    Actually, what I want to make is a little bit different then what you think. I want to make a cooldown indicator for certain tech. So, basically when you use tech, the indicator goes on and follows your character around until it is ready to be used again. In world.spawnProjectile function, there is a variable which can be set to "true" to make the spawned projectile to be affected by the player's position. I used this variable to make it follow the character but the problem was, like I said, I can't do something about its collision box, so it gets stuck into walls or other entities. On the other hand, making it as a particle, solves the collision box issue but... well, I posted this part of the problem on the thread above. So......yeah, I'm kind of stuck right now. I'm just hoping someone to shed some light on my path.
     
  6. AstralGhost

    AstralGhost Pangalactic Porcupine

    Hmm, well if you already have the projectile following the player somehow, I would suggest changing the physics type of the projectile you're using to 'illusion'. This physics type has no collision poly and MIGHT work.

    If you can't get the above to work, an alternative would be to use the new status effect system in the nightlies. Rather than an indicator object that follows the player, you could use some form of a particle effect emitting from the player to indicate cooldown, for example: smoke. Likewise, I believe you can set an icon for status effects in the upper left hand corner under the health bar. (Literal indicators. They just aren't next to the player.)
    Your tech can then just check to see if the status effect (cooldown) is active or not and ignore player's input until it wears off. Same effect as you want, but a different method of obtaining it.

    I'd suggest trying both out and see what works for you. :)
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    AstralGhost likes this.
  8. Riuny

    Riuny Big Damn Hero

    Thank you so much :) I did try to use animation state for this but I couldn't get it work properly. But with this script, now I see what was the problem. I really appreciate your help.
     

Share This Page