Objects
#1

I have a question?
Does anyone know how best to get rid of objects from GameMode, whether to include them as a switch or as FilterScript or something else? Thank you
Reply
#2

Put them on a separate file, and include them, that's how I do it
Reply
#3

create a new file called

objects.pwn and put it in includes folder

PHP код:
forward OnMapsInit();
public 
OnMapsInit()
{
     
/* Objects here */

go to top of you script and add

PHP код:
#include <objects.pwn> 
and add in OnGameModeInit

PHP код:
public OnGameModeInit()
{
     
OnMapsInit();

Reply
#4

Thanks
Reply
#5

Obviously he hasn't read the question right as to remove objects for players, they need to be removed under OnPlayerConnect... Adding objects to the streamer would be under OnGamemodeInit.
Reply
#6

I would recommend to make a separate filterscript. Can be loaded/unloaded via the rcon command. Easier to make changes to the objects as well.
Reply
#7

Quote:
Originally Posted by Sjn
Посмотреть сообщение
I would recommend to make a separate filterscript. Can be loaded/unloaded via the rcon command. Easier to make changes to the objects as well.
There's a bug with filterscript reloading, it's better to have it in the gamemode especially if you want the gamemode to actually do things with the objects.
Reply
#8

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
There's a bug with filterscript reloading, it's better to have it in the gamemode especially if you want the gamemode to actually do things with the objects.
Well, not for me at least. I've been using a filterscript for my maps since I started getting into pawn script and never faced any problems with objects adding/removing from the FS. This is just my recommendation from what I do though.

PS: If you are talking about the bug caused by the gmx, I read somewhere that the gmx is not recommended to restart the server.
Reply
#9

Na, pretty sure I member it being to do with reloading filterscripts specifically.

Easier just to have it all combined properly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)