Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: ent_preload [Re: zazang] #152063
09/12/07 07:41
09/12/07 07:41
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
With preload_mode == 3, morphed entities are preloaded when they are morphed, but not before. How can the engine know which entities you intend to morph in the future?

The solution is a function like suggested by tindust:

morph_preload(STRING* filename)
{
ent_remove(ent_create(filename,NULL,NULL));
}

This can be called in a list for any entity file that you want to morph later.

Re: ent_preload [Re: jcl] #152064
09/12/07 08:20
09/12/07 08:20
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
TripleX Offline
Expert
TripleX  Offline
Expert

Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
void* pTerrain = file_load("terrain.hmp",NULL,&size);
add_buffer("terrain1.hmp",pTerrain,size);

//preloads terrain1.hmp ==> manual

Re: ent_preload [Re: TripleX] #152065
09/12/07 09:23
09/12/07 09:23
Joined: Oct 2003
Posts: 702
Z
zazang Offline OP
User
zazang  Offline OP
User
Z

Joined: Oct 2003
Posts: 702
These are the kind of heads up I was looking for.
Thanks JCL,TripleX !

regards
zazang


I like good 'views' because they have no 'strings' attached..
Re: ent_preload [Re: zazang] #152066
09/12/07 22:22
09/12/07 22:22
Joined: Aug 2005
Posts: 312
Sweden
tindust Offline
Senior Member
tindust  Offline
Senior Member

Joined: Aug 2005
Posts: 312
Sweden
Yes, thanx JCL, TripleX & zazang for bringing up the topic. I'll also add these scriptlets into the bag of useful nuggets for future use.

Re: ent_preload [Re: zazang] #152067
09/14/07 04:39
09/14/07 04:39
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline
Expert
mpdeveloper_B  Offline
Expert

Joined: Feb 2006
Posts: 2,185
agreed, actually it would be cool if we had an engine function that found all entities to be created in the script and preloaded them, or have preload modes


- aka Manslayer101
Page 2 of 2 1 2

Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | 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