Gamestudio Links
Zorro Links
Newest Posts
Mixed frequency history (M1+D)
by jcl
Today at 12:21
New Zorro version 2.12
by jcl
Today at 11:48
This is my fault-tolerant ATR indicator for you
by OptimusPrime
05/18/19 16:35
missing trade variables
by AndrewAMD
05/18/19 12:37
export asset to .txt file
by sdh309795gaas
05/17/19 16:21
LookBack mysteries
by sdh309795gaas
05/17/19 06:28
It is easy for you.
by AndrewAMD
05/16/19 16:39
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online
11 registered (AndrewAMD, kvm, jumpman, mk_1, Dalla, MatPed, FLD, Realspawn, JeyKey II, 1 invisible), 460 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
h4h4rd, ccm, Pippo, hurleydood, JohnLouderback
18222 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: 6841
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

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: 508
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: 6841
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

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: 508
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