Barotrauma

Barotrauma

Not enough ratings
Proximity Fuse Railgun Shell (Proof of Concept)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
72.797 KB
12 Jul, 2021 @ 2:15am
18 Dec, 2021 @ 2:54pm
9 Change Notes ( view )

Subscribe to download
Proximity Fuse Railgun Shell (Proof of Concept)

Description
Functional and balanced proximity-fused railgun shell, has distinctive sprites, must be loaded with explosive . Not tested in multiplayer.

Made from steel and FPGA.

Can be used in campaigns, or for reverse engineering. I added lots of comments to the XML on how it works.
7 Comments
Hornet 30 Nov, 2021 @ 1:19pm 
okay
Krzeszny  [author] 30 Nov, 2021 @ 12:03pm 
I don't recommend doing that, a delay is much easier, but let me know if you make it work.

This is how you apply a tag:
<StatusEffect type="OnWearing" target="Character" stackable="false" duration="0.1" tags="hey_im_a_tag" />

And this is how you read a tag
<StatusEffect type="OnContained" target="Character" SpeedMultiplier="0.1" setvalue="true">
<Conditional HasStatusTag="hey_im_a_tag" />
</StatusEffect>

to read if something DOESN'T have a tag you do HasStatusTag="ne hey_im_a_tag"
Hornet 30 Nov, 2021 @ 9:49am 
okay i`ll try
ty
Krzeszny  [author] 30 Nov, 2021 @ 7:35am 
Wait, flight range? I'm not sure what you're trying to do, is it making the projectile self-destruct?

Normally (actually, always because nobody uses range for that) projectiles are set to self-destruct after a delay. In this case, 10 seconds from firing (delay="10"). Detecting range from the railgun would be hard. You'd need to apply a tag to the firing railgun and detect the range from that tag. Might be possible, but is it what you're trying to do? And why?
Hornet 30 Nov, 2021 @ 12:45am 
I just don't see in the code where it is written in you. I do not know the name of the variable responsible for the flight range, at first I thought it was "launchimpulse". But no.
Krzeszny  [author] 29 Nov, 2021 @ 1:47pm 
Hello. Ranges are in hundredths of meters (100 range = 1 meter)
Hornet 29 Nov, 2021 @ 9:14am 
Hello. I wanted to fix the range of the projectile at the railgun, but I can't understand what it depends on.