OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: mrsarkey on 01 Jul 2006, 19:06:13
-
Well, I have this CTf map and all the players start without a weapon. Instead I have placed the weapons on the ground using the gunsontables script I found on OFP.info. The problem at the moment tho is that when a player picks up a gun it is not replaced with a new one. So after a couple of rounds there will be no guns left! How can I get this script to run on every new round. (I am using the setup for "Real_Paintball" so when u die u spectate until that round is over).
Thanks
-
How do you call the script for the table to be armed?
I guess you could do it with a repeating trigger every 5 or 10 minutes (300 or 600 seconds)
in the activation field [mytable] exec "weaponscript.sqs"
-
It would be helpful to know how you define when a round ends and a new round begins.
However, you might use scripting or use triggers to let a new round start. And there's the place to add the call for your weaponscript.
If you could give some more info about how you manage your rounds, we would be capable to tell you wheres the best place is for it ;D
-
Hi
I have attached the script I am using so you might be able to help a bit better.
Presuming you have seen the script, I call a weapon by putting the correct code into the init line of a Game Logic Object.
SO how do I repeat this for every new round?
(*NOTE, I am Tim, but there have been various account issues*)
[attachment deleted by admin]
-
Well, one of the bog standard MP Missions for OFP is Real Paintball (CTF/TDM) on desert island. The game starts:
Voiceover: 3
2
1
Go go go
Then you play until everybody is dead or a flag is captured.
Once one of these two events has happened a new round starts like:
Voiceover: 3
2
1
Go go go
And so on. Is that clear :P?
-
probably everyone knows the paintball map. sadly i don't have the whole mission scripting in mind.
As i say, there somewhere a trigger or a script which detects if all players dead or flag is captured to start the new round.
At least it has to execute the countdown voiceover script.
It would be more helpful if you upload the whole mission or at least the script which controls the gameflow.
A shot from the hips: try to find this voiceover script or trigger and add there the call for your script.
-
I would name all 13 gamelogics and have 13 repeating triggers each 5 minutes on the map like:
[logic47,"AK47","AK47",0] exec "table.sqs";
[logicRPG,"rpglauncher","rpglauncher",0] exec "table.sqs";
....
but then again I'm no scripting wonder :)
-
I''ll go have another look at the map. First I'll try mykes idea, but I really like Sevens idea of putting some triggers in.
-
Ehm I might want to correct myself;
have an extra little script with all this in it after you named the game logics
[logic47,"AK47","AK47",0] exec "table.sqs";
[logicRPG,"rpglauncher","rpglauncher",0] exec "table.sqs";
etc...
and then have only one repeating trigger instead of 13; I believe that would be better for cpu
execute it in the activation of the trigger like this
[] exec "thisscript.sqs"
-
Makes sense. ;D
-supershooter
*SOLVED*
*SOLVED*
*SOLVED*
*SOLVED*