Well, but now I seems to think that it is not really possible, at least without a NPC-Server. And even then I am not sure. I think that without a NPC-Server, script are executed only on the clients. So that scripts could only affect the player (on it’s own machine). It’s not clear I know.
In Graal, I think you cannot attach a script to the map. That’s where I would like to attach the script to randomly distribute weapon before each game.
I think they can only be attached to weapons and NPC.
Oh… each weapon would have to teleport itself in a random chest, or under a random
bush. But then, as it is executed on each client, each client would have them in different places I suppose. Unless there is a way for the client to request a random value to the server, that would be the same for each clients.
Also, how could the script to end the game could have the right to teleport everyone back to their starting point? I doubt it can.
I’m still fairly new myself, but I think you’re making it overly complicated. I would guess that the best way to do your random weapon location thing would be with server strings. For instance, you could have an NPC in one of the start locations that has something like:
then in each of the levels have an npc that on playerenters() check this server string to see if we need to drop a weapon-chest and if so, what the location of that chest should be. (maybe throw another element in the list for if the chest has been opened already so multiple players can’t open the same chest multiple times).