Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, AndrewAMD, Imhotep, TipmyPip, Edgar_Herrera), 809 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Force reload of an entity? #476608
03/13/19 12:42
03/13/19 12:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Hello!
I am working on a level editor for my game to be used by players.
I create some MDLs at runtime in that editor and save them to disk. It is necessary to change that MDL, re-save it and ent_create it again. External modifications on the MDL might happen as well.

The problem is that on further ent_create calls only the first version of the MDL will be loaded, most likely as the MDL is in the entity cache still. ent_purge does not seem to remove it from the cache, only level_load does, right? Reloading/ clearing the level is not an option for me though.
add_buffer(name, NULL, 0) does not seem to have an effect on those entity/ engine buffers.

Is there any way to force a reload for a filename?

The only workaround I can think of right now is setting meshes manually.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Force reload of an entity? [Re: Superku] #476609
03/13/19 14:02
03/13/19 14:02
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
How about ent_reload? Does that help?

Re: Force reload of an entity? [Re: Emre] #476610
03/13/19 14:34
03/13/19 14:34
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Lol... that's exactly what I've needed, thank you. Never seen that function before.
I had searched the manual (ent_create and ent_purge pages, related items, offline and online) and even used the index search to search for the term "reload" but skipped looking at all the results because you get WED and other misc pages first.
Thank you.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Force reload of an entity? [Re: Superku] #476612
03/13/19 19:26
03/13/19 19:26
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Glad to help. To be honest, i didn't know there was such a function either, until few months ago. laugh


Moderated by  old_bill, Tobias 

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