OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: RedHavoc on 06 Feb 2004, 20:03:52
-
Hello. How can I make a mission, where are 2 flags, one on both 2 teams side, and when the other team controls enemy flag for let say 1 minute, it wins? ???
-
hey.......
There are lots of tutorials, in the editors section here. I am most sure you wil find your answer there.
Take care
-
Nope
-
Havoc nobody is going to tell you how to make a complete mission
Asking specific questions about specific problems will bring forth much help
Scripting, missionmaking is a very steep learning curve to start off with
My advice to you is:
1) Grab a de pbo program, there is one available on this site
2) Read through the comref
3) De-PBo some C&H missions
4) Spend a good few hours reading through the scripting and Mplayer scripting forums
Then have a go and come back to us with more specific questions
What you basically need to so is create a 2 flag C&H
and then adapt scripts from their
This is the only way that you will learn the ins and outs of how things are done.
This may seem to you a cold hard approach
To folks on these forums, your question doesn't come over as "How do i do X?" but more of "Will you create a complete mission for me please"
Hope this helps, please stick at it, it is worth the effort
-
Yes, there are many C&H tutorials, but they all have scoring system, I meant, when the flag has been hold for 1 min, the team will win. I just need to know how make correct time limit when the flag is hold. :P
-
have the following script run by each flag
in other words add the following line into each flags initilaisation box
this exec "Flags.sqs"
create a gamelogic and give it the name "Server"
The following script will run server side only, which is the best method for script of this type
Substitute the variable name "X" for the amount of time a side needs to own a flag for before they can win
eg _count = 120 (2 minutes)
;;;Flags.sqs
?!(local server): exit
_Flag = _This select 0
#START
~0.5
?(Side flagowner _Flag == West) : goto "WESTHAS"
?(Side flagowner _Flag == EAST): goto "EASTHAS
goto "START"
#WESTHAS
_count = X
#WLOOP
~1
?(Side flagowner _Flag == EAST): goto "EASTHAS
_count = _count -1
?(_count <= 0): Westwins = True; goto "END"
goto "WLOOP"
#EASTHAS
_count = X
#ELOOP
~1
?(Side flagowner _Flag == WEST): goto "WESTHAS
_count = _count -1
?(_count <= 0): Eastwins = True; goto "END"
goto "ELOOP"
#END
Add whatever additional lines you need to run an outro or the end mission trigger etc under the #END label
You have 2 booleans "Eastwins" and "Westwins" which you could publicvariable so that each client has the boolean activated. You could then use this boolean (True or false variable) to run an outro or run lines in a script or use it as a condition for a trigger
the rest is up to you