Duplicated actor

However, not necessarily the best solution but it should work and might make other casting troubles much easier down the road.

You want to open your Game Instance and create a variable in it (this can be your AsPale Variable)

Now from anywhere else you can easily cast and Get/Set this variable (think of it as a stable middleman) - you will need to cast to your Game Instance (screenshot below)

image

and then either get or set your variable.

So in your case, upon interaction cast to GI and set the variable as AsPale
Then when you want to reference it, you just need to cast to your GI and Get AsPale.

Again, it’s not ideal because this can get out of hand quickly with a lot of variables but it is usually the first step in creating a save system, so its also a good idea to add variables here you’ll want to save and load later on (but sometimes I like to use it as a hassle-free mode of communication)

1 Like

The event destroy does not work as it should?


is it because you use Getactorofclass instead of getallactorsofclass and looping through them all? atm you are just getting one of them

Edit: i shouldn’t say all, but you need to feed your getactorofclass with the correct AsPale

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.