How to summon an object with a cheatcode?

Hi. I want that when a user enters a combinations of keys something that has physics will drop from the sky. Can you please suggest how to do it? I don’t really know how to summon objects either :slight_smile:
Sorry for noob questions, I watched a lot of tutorials prior asking, I just can’t figure things out on my own.

I think you need your own console manager for adding own commands. But it is not exposed to blueprints so you need C++ for it.

This is bad… This is very, very bad… But what about summoning objects on just let’s say a key?I know how to bind events on keys, but I don’t know how to summon, not a great mage yet, please halp :slight_smile:

Hey mate what do you think about this?

Does that work only with downs-unders-lefts-rights or it also works with combination of letter? Please man advice how to summon stuff

Hey QurbanOlum,

There are 2 different things here - capturing the exact keys in order and summoning an object. I’ll help you with the summon:

Summoning is nothing more than Spawning An Actor From Class at a specific location. Simple steps:

  • So for now, create a new input key and call it “Summon”
  • Inside your character blueprint grab the Summon Event and from there type “Spawn Actor from Class.” Specify the class you want to spawn (this is the blueprint that will appear in the sky).
  • Then drag from Transform and select Create Transform
  • Then type Get Actor Location. From the node drag and type ‘+’ and get Add Vector. Add a large number to the Z value (height in the sky relative to the Player’s position). Then connect this to the Location of the Transform.
  • Use Get Actor Rotation and connect this to Rotation inside the transform
  • Make scale 1,1,1.
  • Inside your blueprint that will be summoned, make sure you enable Gravity and Simulate Physics.

Now when you Press ‘Summon’ your blueprint will spawn on top of the Player and will fall with gravity.

Hope this helps!

Hi man!! Thank you very much for this great tutorial!!! Very appreciated! I encountered a problem can you please look? Whenever I drag “Create transfrom” from “spawn transform” I don’t see a “creater transform option” :cry:


THANKS MATE IT’S ALL GOOD I FIGURED IT OUT it was just “make” transform :slight_smile:
Do you also know how to make an array of stuff to drop in random order?

Do you also know why it spawns only in a some place regardless of my rotation? Like, wherever i turn my character - class will only spawn in the same place

Hey QurbanOlum,

Glad it worked out! I think you mean that when you rotate the Burgclass doesnt spawn 1000 units infront of the player? (Since you have X=1000). Thats because thats the world position, and not the relative position. If you want the spawn to always be 1000 units infront of the player, then you need to do the following:

Get Actor Forward Vector and multiply it by 1000, then Break Vector (right click on the out pin and click on break). Then Plug the X and Y into Make Transform and leave Z to 1000 :slight_smile:

Omg thanks man you are the best!!!

Thanks for your answers man. But just one last thing, I have a problem, I can plug only one pin x or y please halp

Ok man no worries I figured this out myself thanks!

Glad you figured it out :slight_smile: