Jump to content

How do I make a loreshot deal no damage but still pull you towards it?


Recommended Posts

Hey guys, I'm trying to make a grappling hook using the loreshot, but it causes damage as well as pull you across a certain distance. And when I dial the damage to 0, it won't pull me at all... How do I make it so that it pulls me toward it without causing damage?

 

 

Share this post


Link to post

LoreShot's pulling code is in its DoSpecialDamage function, which does not activate if the damage is 0.

 

 

If you are using ZScript, you can try this:

 

Make projectile derived from LoreShot (I guess you are already doing this), set its damage to some number greater than zero (but not more than million ofc), and put this override in the class definition:

override int DoSpecialDamage (Actor victim, int damage, Name damagetype)
{
	super.DoSpecialDamage(victim, damage, damagetype);
	return 0;
}

It should pull the target (as damage of the projectile is set to non-zero), but it will not actually do any damage, because the override returns zero at the end.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...