3 registered members (Quad, EternallyCurious, 1 invisible),
852
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Need help with this code snippet
#440896
05/05/14 15:34
05/05/14 15:34
|
Joined: Mar 2013
Posts: 18 USA - East Coast
DarkProgrammer
OP
Newbie
|
OP
Newbie
Joined: Mar 2013
Posts: 18
USA - East Coast
|
I need some help with this code. Just started playing around Lite-C. after running it the display is blank. I expected a rotating sphere to appear. I thought the line ENTITY* sphere = ent_create("sphere.mdl",vector(0,0,0),NULL); would create a sphere primitive shape that would get rotated. Any advice would be helpful, so, thanks in advance.
#include <acknex.h>
#include <atypes.h>
#include <default.c>
function main()
{
level_load(""); // open an empty level. you can use NULL instead of ""
ENTITY* sphere = ent_create("sphere.mdl",vector(0,0,0),NULL); // create sphere model at position (0,0,0)
while(1)
{
sphere->pan += 1; // rotate the sphere with 1 degree per frame
wait(1); // wait one frame
}
}
|
|
|
|