getRenderType()

From Hack Wars Wiki

Jump to: navigation, search


This Article is Incomplete
This article is apparently incomplete. You can help the HackWars wiki by expanding it



Information for free function getRenderType()
Function getRenderType(int spriteID)
API 3D Hacktendo
Description Returns an int value for the render type of a sprite.


This function will return one of the following values:

0 - A 2D flat sprite
1 - A 3D sphere object
2 - A 3D cube object
3 - A 3D cone

Example

The following code will create a cube sprite using image/script 0 from the resource manager, when your map is loaded.

int player = 0;
  int r_type = 0;
  player = createSprite(0,0,10,10,0);
  setRenderType(player,2);
 
  //return the render type into a seperate variable to demonstrate how its used.
  r_type = getRenderType(player);
Personal tools