Jump to content

createColCuboid - how to extract it's size?


Yazir

Recommended Posts

Posted

Hello! I have a problem - I need to retrieve size of cuboids. How can i do that, I can only retrieve it's position.

Also is there any simple way to make cuboids? Like making own definition to editor?

  • Other Languages Moderators
Posted
On 04/02/2017 at 12:40, Yazir said:

Hello! I have a problem - I need to retrieve size of cuboids. How can i do that, I can only retrieve it's position.

Also is there any simple way to make cuboids? Like making own definition to editor?

Are you using this to create the cube?
 

local cubeCollider = createColCuboid ( posX, posY, posZ, sizeX, sizeY, sizeZ )

 

Posted (edited)

There is the server-sided getAllElementData but whether or not it gets data added natively I don't know.

If it returns a table simply loop through it and output the key and value.

Edited by Dealman
  • Like 1
Posted

I'll have a look on that.

I have a problem with something else. I've drawn an rectangle with dxDrawRectangle, do you know how i can change it's size?

Posted

The getAllElementData function returns only the data set with setElementData.
Given that the wiki states width, depth and height as the attributes used in map files I'd say that are the names of the values you are looking for.

Posted
23 minutes ago, Yazir said:

I'll have a look on that.

I have a problem with something else. I've drawn an rectangle with dxDrawRectangle, do you know how i can change it's size?

DX drawings return no element, so you have to use variables and then change these when needed.

Posted (edited)
expBar = dxDrawRectangle(screenW * 0.8562, screenH * 0.1731, screenW * 0.0906, screenH * 0.0139, tocolor(194, 129, 26, 255), true)

So this won't work if it is as you say. I can set  width to a variable then change the variable to change bar and it will update dynamically? 

Edited by Yazir

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...