Im woundering how i can create my own event for activate and deactivate.
Basically i want to have an event that is fired each time my object is turned on or off, using (E) button.
How would i go about doing this using the graph?
I seen functions such as Activate, Deactivate, IsActive, but thouse are not what i want i think.
I suppose i could create my own custom event and have it run in a while loop that checks IsActive and sets a bool containing its state.
But i read that Custom event should not be used for things like this. due to performance. So this is something im trying to avoid.
I am looking for the same thing. Ordinarily, it would be fairly simple to use an objects construction script to control that, as it is called every time an object is modified/accessed. For some reason, PrimalItemArmor items have no construction script and can’t have one added.
I Could not find any functions or events to support what i wanted.
However i came up with a workaround what works just fine in my case. in case others have the same issue here is what i did.
I created a sphere component around my object and a bool variable. then i created a graph like this. after hours of googeling and searching.
this is what i ended up with.
Note that the radius of the sphere must be greater than the distance at which the (E) pops up on the object.
Construction scripts are only available for blueprints that are not considered data only - in other words they must be an agent that can be placed in the world in order to have a construction script. It is the same reason why there is no components tab for that blueprint. Furthermore, I believe it is standard for construction scripts to simplify level creation. The example I recall given for a construction script in the UE4 documentation is having a light object select its color based on the environment when it is placed.
Ok, that explains why there is no construction script. Can you think of any way to accomplish the same goal of triggering an event when armor is worn? Every example or tip I’ve been able to find about how to make things happen when something is used, accessed, or otherwise modified revolved exclusively around construction scripts.
There is a lot of blueprint exposure coming alongside the survival of the fittest release. You could maybe see if you can get an overlap event for an armor mesh on a player, but otherwise I have nothing really to suggest. Always just open up whatever blueprints you are interested in or are related, show inherited variables, and see if there is anything you can work with there.
Thanks for the tips. I’ll continue to experiment some, but I think you are right and it is likely I will need something from the newly-exposed values. Coincidentally enough, I am working on a full conversion anyway, so one way or another I should be able to make it happen.
did you guys ever find any solution for this … I just want an event that’ll fire on a “smithy” placed (not being placed) in the world… don’t care what event ANYTHING… activate, collision … anything at all that will actually fire in game… I had on hit that fired ONLY in the toolkit.
EDIT: I did get one to fire …event begin play wasn’t working til I used a .2 sec delay right after it
Yes i did Find a way. this was something i did before the multiuse function was introduced.
But this method is not reccomended due to a bug with the engine. so you need a workaround for that aswell. heh.
But if you do need to create a event to just triggers when you activate/deactivate a actor.
Use the multiuse fuction.
But what you are asking is not the same question…
You said you dont care what event. well you already got the event you need to check if its placed or beeing placed. “Event Begin Play”
You just check the material of the actor mesh. if its the preview material its beeing placed and not placed.