Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by rayp. 10/15/25 20:44
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, Quad, 1 invisible), 6,617 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Engine-core question regarding ent_remove process. #396530
03/07/12 19:44
03/07/12 19:44
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Hiya all.

I got a couple of "deep" questions regarding how ent_remove works.
They pertain to how ent_remove works when it is executed, and
how it interacts with the engine task-scheduler.
They're pretty core-level question, so thats why I posted here...


Question#1 ::
When an ent_remove is executed, when does the engine wade through all the
scheduled tasks in order to dump all the ones that have a ME pointer
that matches the entity just removed?
A> Does it IMMEDIATELY process the whole scheduler list?
B> Or does it do the whole list at the next wait/return?
C> Or does it do something different?


Question#2 ::
When ent_remove is checking if a scheduled task needs terminating because
its ME has been removed, is the ME that is being checked in this task..
A> ... the ME that it had when the task was FIRST STARTED?
B> ... or is it checking the value that ME has NOW?


Im asking question#1 just or curiosity. I like to know how things work.
Im asking question#2 because Im having some difficulty with some of my
code involving 'proc_status2' and 'proc_kill'.
But I am doing a bit of 'me'-shuffling, so what Im trying to do is just
not feasable if question#2 is answered by A...


Thanks guys...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Engine-core question regarding ent_remove process. [Re: EvilSOB] #396601
03/08/12 09:29
03/08/12 09:29
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
The scheduler list is processed immediately. It only checks the current "me" pointer - the engine won't remember which value that pointer had when the task was started.

Do not rely on this crude mechanism to fix pointer errors. The normal and proper method is to have code in your script that terminates all its actions and clears all its references when an entity is removed.

Re: Engine-core question regarding ent_remove process. [Re: jcl] #396607
03/08/12 10:49
03/08/12 10:49
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline OP
Expert
EvilSOB  Offline OP
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Cool. Thanks dude.

This system is fine for THIS task, as it is only a debugging tool.
This 'action' only has ont reference, and it is an unchanging STATIC one.

The code is actually behaving fine now.
The 'difficuly' I was having was based on my coding elsewhere not behaving
as expected, but now fixed...


Again, thanks for the clarification.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  old_bill, Tobias 

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