Game Development Community

Latency with (de)activatePackage

by Frank Bignone · in Torque Game Engine · 01/12/2003 (1:52 pm) · 7 replies

I have a weird bug in my program. I use the command activatePackage and deactivatePackage to switch from one mission code to another one as regard to the mission objective. However, it seems that they are some delay before the commands take effect :

activatePackage(racing);
startMission
...
deactivatePackage(racing);

activatePackage(ctf);
startMission <- here i will have some racing code running on the first call
... <- here CTF code will work

Any hint ?

Thanks

About the author

Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.


#2
01/27/2003 (12:56 am)
I have found problems in deactivate package in the past in exactly that context which is why I went to a gametype object architecture instead.

Sorry, I know that was not much help :(

I have been thinking about doing a resource on how to set up gametype object architure for TGE but I was unsure how many people would find it useful.
#3
01/27/2003 (2:37 am)
ooh that would be very useful I believe.
#4
01/27/2003 (7:32 am)
I for sure will find it useful too :)
#5
01/27/2003 (10:14 am)
Count me in as well :)

@Daniel, i've looked through your code to see how you set up your gametypes but got confused. A resource would be great!

Mike
#6
01/27/2003 (11:51 am)
ok
I will do up a resource for it then

Woke up this morning with a possible reason for your package problem though. If you were calling deactive package from a function in the package then the function would have to end before deactive package would work.

At least, this is what used to happen from some tests I ran a long time ago in tribes 2.