Gamestudio Links
Zorro Links
Newest Posts
error
by OptimusPrime
Yesterday at 22:10
Error message : Closing Order Quantity
by OptimusPrime
Yesterday at 22:07
Votes for future features
by ags
Yesterday at 19:19
New Zorro version 2.03
by brax
Yesterday at 11:20
Doubts about Detrend modes
by jcl
Yesterday at 08:40
Download all constituent stocks within Russel 1000
by jcl
Yesterday at 08:26
datafeed and broker are different, possible?
by jcl
Yesterday at 08:24
AUM Magazine
Latest Screens
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Who's Online
3 registered (AndrewAMD, jrath, OptimusPrime), 616 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
danatrader, ilikezorro, jibanes, nandv, cam1234
18187 Registered Users
Topic Options
Rate This Topic
#476608 - 03/13/19 13:42 Force reload of an entity?
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6826
Loc: 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

Superku - stuck in development hell: http://store.steampowered.com/app/407570

Check out my new game: Pogostuck: Rage With Your Friends

Top
#476609 - 03/13/19 15:02 Re: Force reload of an entity? [Re: Superku]
Emre Offline
User

Registered: 07/28/07
Posts: 501
Loc: Turkey, izmir
How about ent_reload? Does that help?

Top
#476610 - 03/13/19 15:34 Re: Force reload of an entity? [Re: Emre]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6826
Loc: 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

Superku - stuck in development hell: http://store.steampowered.com/app/407570

Check out my new game: Pogostuck: Rage With Your Friends

Top
#476612 - 03/13/19 20:26 Re: Force reload of an entity? [Re: Superku]
Emre Offline
User

Registered: 07/28/07
Posts: 501
Loc: Turkey, izmir
Glad to help. To be honest, i didn't know there was such a function either, until few months ago. laugh

Top


Moderator:  elsewood, 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