top of page

Variables

MPM features two main blueprints:

  • BP_MagneticObject_Master

  • BP_Container

Both of these blueprints contain variables used for setting up the object to your liking, and some variables used for functionality of the object.

In this section we will walk through each of the variables with a short explanation of what it does.

Magnetic Object

In this section we will walk through each variable used for adjusting and setting up the BP_MagneticObject_Master to your liking

bpmaster.png
mastervariables.png

- Player Class: This is where you plug in your player character. This way the object knows which actor to target

- Distance Influence: Object will fly slower towards the player the further they are away, and will go faster the closer they get. The smaller this number is the greater the impact of this effect.

-Magnetic: Determines whether or not the object should be magnetic. If this is set to false the player will still be able to pick the objects up, but the objects will not fly towards the player.

- Should Despawn: If this is set to true, the object will despawn after (DespawnTime). If set to false the objects will never despawn until they are picked up.

- Mode: There are two modes available:

  • Physics Mode

  • Time Mode

Physics mode applies a continuous force with a value of

(ForceStrength) towards the closest player that is in range of the object and has a line of sight.

Time mode starts a timeline as soon as a player get in range of the object and has a line of sight.

Both of these modes will switch targets if another player gets closer than the current target.

- Despawn Time: This will determine the amount of time it takes before a pickup despawns if (ShouldDespawn) is set to true. This value should not be smaller than five.

Pickup Sound: This sound will play when the object is picked up.

- Force Strength: The amount of force applied to the object when (Mode) is set to "PhysicsMode".

Container
containervariables.png

In this section we will walk through each variable used for adjusting and setting up the BP_Container to your liking

- Item Amount: This determines the amount of items that should spawn when (RandomizeItemAmount) is set to false.

- RandomizeItemAmount: This determines whether or not the container should spawn a random amount of items or a fixed amount of items. If set to true, the container will spawn a random amount of items in the range of (MinRandomItems) and (MaxRandomItems).

If set to false the container will spawn (ItemAmount) amount of items.

- Min Random Items: The minimum amount of items the container should spawn when (RandomizeItemAmount) is set to true.

- Max Random Items: The maximum amount of items the container should spawn when (RandomizeItemAmount) is set to true.

- Spawnable Items: This array holds all the spawnable items for a container. The container will get a random entry from this array every loop and spawn this item.

Items in this array should have physics set to enabled.

- Player Class: This is where you plug in your player character. This way the container knows which actor can open the container.

- Item Spawn Speed: This is the delay between each item in seconds. The lower this number the faster the items will spawn.

bottom of page