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"

static mesh help

alt textCan anyone please tell me why this script does not work to make the stick figure turn "Invisible" as you can see when i step over the trigger it runs properly but the stick figure still remains visible.

alt text

Product Version: UE 4.16
script.png (378.6 kB)
more ▼

asked Nov 25 '17 at 06:55 PM in Blueprint Scripting

avatar image

11 4 3 6

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

1 answer: sort voted first

Ok, here is what you need to do -

By what you said and I understood is you want to create an actor which has a static mesh and a box trigger. Now you want that you can set the location of the box trigger in your level and when your player steps inside that box trigger, your static mesh visibility is turned off(You have to set the collision to "No Collision" as well or your player can still bump into your static mesh)

  • Make a blueprint actor. By right click->Blueprint Class->Actor. I named mine "MonsterCube"

  • Open it up and add two components inside -> A static mesh and a Box. You need not make the Static Mesh the root and attach the box to the static mesh.

  • Add a vector variable and call it "TriggerLocation". Make it public, by clicking the little grey eye icon against the variable you just created. It will turn yellow.

  • This is how it should look like - alt text

  • Inside the event graph this script - alt text

  • Inside the construction script - alt text

  • Place actor in your level. Set the trigger location to whatever you like, relative to your actor - alt text

  • Play and when you walk inside the trigger. The static mesh will disappear. alt text

After this - You can further extend the usability of this actor by making the static mesh to instanced Static Mesh and creating multiple stick figures. Also, you can just like with the location, set the scale and rotation of the box trigger too by making them public variables dynamically too. The possibilities are endless, just have to figure a logical way out.

first.png (293.3 kB)
second.png (197.5 kB)
three.png (205.8 kB)
four.png (424.4 kB)
five.png (781.3 kB)
more ▼

answered Nov 26 '17 at 06:45 AM

avatar image

650 13 13 28

avatar image Jsoul89 Nov 26 '17 at 06:48 AM

absolutely perfect THANK YOU SO MUCH

(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