Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

FPS weapon ideas

I have ideas for a gun that launches electrically charged javelins. Individually, they're charged with electricity, but when fired in succession across a surface like the floor or from wall to wall, an electric fence is built where currents of electricity can cause minor harm to players passing through the current. Problem is I don't know where to start.

Product Version: UE 4.17
more ▼

asked Oct 02 '17 at 04:46 PM in Using UE4

avatar image


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I know its old but just in case someone comes looking. off the top of my head start by creating a javelin projectile that flies and lands how you want, when it impacts with the wall or floor have it spawn an actor class with the same static mesh and give it the same location and rotation and then have the projectile destroy its self.

I imagine you might want a javelin to be only able to link to two other javelins so create a variable and call it "links" set it as an intiger and keep it at 0. create a scene component for each arc of electricity you want and place them along the shaft of the javelin where you want the electricity to come from.

on spawn you want it to look for any other javalins except itself. filter out any which are too far away and any that have "links" at 2 or more. then out of those that are left, if any, get the nearest one and store it as an object variable then Increase the variable "links" in both the target javelin and the spawned javelin (to stop multiple javalins linking to the target).

from an event tick create a ray trace from each scene component in the spawned object to its corresponding scene component in the target and use that to draw a particle effect and to trigger damage when a player crosses. you could also set it to relook for a new target every second or so if you want it to adapt then just refine from there.

more ▼

answered Dec 01 '18 at 02:05 PM

avatar image


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question