Issue on creating DynamicObject using y_hooks
#3

Quote:
Originally Posted by Symon
View Post
You don't have to hook anything if you're just adding objects (AFAIK).

All you have to do is create a map file which contains all objets (i'd call maps.pwn).

In that file create a function like CreateServerObjects() and put all your objects there.

Then include maps.pwn in your main game using:

pawn Code:
#include "maps.pwn"
After add CreateServerObjects() in OnGameModeInit on your main gamemode as well.

Note the include code i posted retrieves the maps.pwn file from inside gamemodes folder. You might want to change it based on your needs.
I made as you said in my second attempt but I'd like to know why write the map under the hook of OnGameModeInit doesn't work. There is something I don't know about the hooks?

(Btw thank you for respond! I'll use this method for sure, but as I said, I want to know if I'm missing something)

UPDATE:
Solved, my mistake.
Reply


Messages In This Thread
Issue on creating DynamicObject using y_hooks - by pollo97 - 27.03.2020, 09:33
Re: Issue on creating DynamicObject using y_hooks - by Symon - 27.03.2020, 10:42
Re: Issue on creating DynamicObject using y_hooks - by pollo97 - 27.03.2020, 10:57

Forum Jump:


Users browsing this thread: 1 Guest(s)