Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Create Primitive Object #152184
09/04/07 21:22
09/04/07 21:22
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
Hallo

I would like to create dinamically primitive object (cube, Sphere, etc) by code in Lite-c.
Is it possible? How could i do this?

thx

Re: Create Primitive Object [Re: amadeu] #152185
09/07/07 19:27
09/07/07 19:27
Joined: Apr 2004
Posts: 516
USA
Trooper119 Offline
User
Trooper119  Offline
User

Joined: Apr 2004
Posts: 516
USA
Yes, very possible, see:
Code:
 ent_create(STRING* filename, VECTOR* position, function);



Description:
Creates a model, sprite or map entity in the current level. Mostly used for creating bullets or explosions, or for creating players in a multiplayer game. The given function will start immediately after creation, with the my pointer set to the created entity, and you set to the creating (if any). The instruction returns a pointer to the created entity that can be used for setting further entity parameters.
ent_create creates a global entity on the server and on all connected clients. The entity function runs on the server. ent_createlocal creates the entity on the local machine only. A local entity is not transmitted to the server, and thus not visible on other clients. The local entity function runs on the local machine only. Local entities can be used for advanced particle effects, player weapons or the like. In a single player system, both instructions are identical.

Simply put ent_create("name-of-file", aPositionVariable, NULL-or-a-Function); into your code and you can put anything into your level that you want, you simply need to know what it's called. Check out earthball.c in your "C:\Program Files\liteC\work" file, this shows you a lot of very simple starter functions you may want in your code.


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C
Re: Create Primitive Object [Re: Trooper119] #152186
09/07/07 19:29
09/07/07 19:29
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
i think he didn't mean an en_Create (A

@amadeu
just look at the work folder in lite-c there are examples for directx-> create models
donno if that helps, but take a look at it


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1