Igor Q. 519 Posted November 5, 2018 Hi. I want to create a trigger where when a person equips a map, automatically an arrow spawns above them pointing to the way point they need to go to. (The reason being that they cannot equip both a map and a weapon at the same time being quite important) My trigger currently uses the Event: On Game Start Repeat: 1 Time (It's a loop function) IF: GET ACTIVE ITEM character "ItemID" Then: Spawn Entity Arrow Sign However this trigger doesn't seem to work while the character has the item equiped. Any ideas? Share this post Link to post Share on other sites
Fompster 141 Posted November 8, 2018 Hey Igor, First of all you need to use the event listener and place the script within that and not the map itself. Here are the settings which are supposed to be on it (when you double click it) As for the code that goes in it is this: If you have any other questions don't hesitate to ask Share this post Link to post Share on other sites
Igor Q. 519 Posted November 26, 2018 Hey again! I was able to successfully make the trigger! However when I try to orient my arrow to point to somewhere I can't get it to work. Currently I'm trying to make it so that each time it spawns it "points" to a treasure chest. Problem is, I have tried several functions and none of them have worked. I've tried "Aim to entity", as well as trying to "Set Orientation" by calculating the angle using Sin and Cos functions however the "Get X vector" function and finding the difference in position function doesn't seem to work Any ideas? Share this post Link to post Share on other sites
Igor Q. 519 Posted November 26, 2018 Alright I was able to figure out this god forsaken trigger that took me so long. 1 Share this post Link to post Share on other sites
Fompster 141 Posted November 26, 2018 Cool so I take it that it works now? You deserve a nice pat on the back now And by the way can you explain to me what the function dot a: , dot b: does? Share this post Link to post Share on other sites
Igor Q. 519 Posted November 26, 2018 (edited) The function DOT A B is a dot product for vectors. It basically multiplies each component separately. Ex: Dot (1,2,3) (1,2,3) = (1,4,9) or Dot (1,1,1) (1,2,3) = (1,2,3) It was the only way I could convert the vector into a savable variable. So I could store those values for computing the angles/distance. Edited November 26, 2018 by Igor Quintero Share this post Link to post Share on other sites