Jump to content

Spawing Item Slightly Higher?

Jason Campbell

Recommended Posts

Hello all,

I've finally got a loot box that spawns a random item inside it.Problem is it places it at the very bottom of the chest, so it can't be seen.

Any way to spawn it in the center of the transform of the box?


%trans is the chests transform


%lootItem = new Item()
  datablock = %item;
  static = true;
  rotate = false;
Link to comment
Share on other sites

I hardly know any games that actually spawn items inside boxes, in most games you click the box and a GUI opens that shows that there is an item in the box, while there is actually nothing inside it for real. Other games spawn the items outside of the box when you "open" it or it is destroyed.

Link to comment
Share on other sites

If it appears on top of the box anyways, you can shoot a raycast from the top and it will always spawn exactly on top of the surface, start 1.5m from the top or so in case it is indoors so it will not spawn on the upper floor.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...