Author Topic: Activating and deactivating packages during the game  (Read 1029 times)

Is this a good idea? It seems like a great solutions to one of the problems I'm looking to overcome.
For example, during one "challenge" each brick the player places would contain a certain event but in another challenge this would not happen.
When the first challenge begins, I activate it's corresponding package, and deactivate it when it finishes. Then I may activate a second package for the second challenge and so on...

And by good idea I mean, will this cause any issues with the stability of my server?

It shouldn't, if you do everything correctly. You can also just do variable checks...

Gamemode_Turtorial has the trigger checks for jetting and not jetting, you could use that.

It shouldn't, if you do everything correctly. You can also just do variable checks...
Yeah, this is exactly what packages are for, it shouldn't cause any issues

It shouldn't, if you do everything correctly. You can also just do variable checks...
Mainly because i will have something like 50+ challenges and i have to override different functions on different challenges. Id rather not have a switch statement in each function for all those possibilities considering each challenge is pretty different and need to override the functions differently. Its just easier and nice to have it all organized into a package and be able to activate package "Challenge4" with all the functions it overrides in a seperate little thing split from everythin else

It sounds like this could produce issues unless you're coding a strictly singleplayer gamemode. Say Player 1 is on Challenge (package) 5, and Player 2 is on Challenge (package) 1. If both of them parent the brick plant, you're going to have to make a secondary system that filters Player 1 from package 1 and Player 2 from package 5, which defeats the purpose of using the package thing in the first place.

However, in general activating and deactivating packages is a good way to disable and enable functionality server-wide.

Sounds like you're trying to get too dynamic here. You really only need 1 package.
« Last Edit: July 19, 2013, 04:45:29 PM by elm »

It sounds like this could produce issues unless you're coding a strictly singleplayer gamemode. Say Player 1 is on Challenge (package) 5, and Player 2 is on Challenge (package) 1. If both of them parent the brick plant, you're going to have to make a secondary system that filters Player 1 from package 1 and Player 2 from package 5, which defeats the purpose of using the package thing in the first place.

However, in general activating and deactivating packages is a good way to disable and enable functionality server-wide.
Every player is on the same challenge, they will never be on different challenges