OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: TERA_Forrest on 03 Apr 2004, 08:49:01
-
is there a way that i can have an option in the multi player "choose a side" screen to add one ai unit or delete a unit?
to be more specific... u somtimes see an option in the multi player screen for day, noon or night. Thats kind of what i'm lookin for.
what i'm actually wanting to do is add an option to see the intro or skip it. One trigger having the ai present would set off the other camera sequences and music.
-
haven't tried this, but off the top of my head:
in the trigger that calls your intro, put condition:this and param 2==1
change the description.ext to some thing like:
titleParam2 = "Intro Movie:";
valuesParam2[] = {1, 2};
defValueParam2 = 1;
textsParam2[] = {"Intro On","Intro off"};
may take a little tweaking but thats the general idea where I would start working.
-
thanks zombie... i'll give it a try
-
this and param 2==1
when i try to put that into the "condition" field of the trigger i get an error "unkown paramitor" somthing or other, then the "typing line" goes next to the "2"
-
bump
-
ok, I believe you can remove the "this" part of the trigger
condition: param2 == 1
activation: [] exec "intromovie.sqs"{or whatever your movie is named ;) }
for no movie, no trigger required.
btw, you can make this a "zero trigger" also
axis a 0, axis b 0 activation none, once and not have to worry about some ai to call the script
also in the movie script itself you could just add:
?(param2==2):exit
right at the beginning.
Once again, all of this is off the top of my head, I haven't tested it for errors but should get you pointed in the right direction ;)
-
thanks for the info Zombie, i'm still trying to figure out how to make the intro without triggers, it'll be some time before i come to this.
:)
-
your welcome! If you would like, ther are 2 excellent tutes in the editors depot for making scripted cutscenes, which also work as intros and outros. Start here: javascript:open_snippet('resource_view.php?id=50') (http://javascript:open_snippet('resource_view.php?id=50')) then read this one:javascript:open_snippet('resource_view.php?id=557') (http://javascript:open_snippet('resource_view.php?id=557')), if you can get your brain around these 2 concepts, you'll be making great intros,outros,cutscenes. Using triggers and attaching cameras to them never made sense to me, but the camera.sqs is very easy to use! Enjoy!
-
ummm, thought I put those hyperlinks in right, maybe not? I tried to link to Snypers cutscene tute and Messiahs camera sqs tute. Admin, help?!
-
Best not to try linking to the open java applet.......just link to the page the resources are on.
Planck
-
Description.EXT
titleParam1 = "DAYTIME";
valuesParam1[] = {1,2,3,4,5};
defValueParam1 = 5;
textsParam1[] = {"Sunrise","Midday","Sunset","Night","24hrs"};
titleParam2 = "GAMEPLAY";
valuesParam2[] = {1,2};
defValueParam2 = 1;
textsParam2[] = {"Intro ON","Intro OFF"};
INIT.sqs
;; intro array contains the names of all the units, vehicles and objects that you only use for the intro
eg
Introarray = [E1,E2,Chopper1]
;;;________PARAM1 & PARAM 2 OPTIONS SYSTEM___________________________
;;;________PARAM1________
;;NB>>> for thjis to work correctly, the map time set in the editor should be midnight
;;adjust the following skiptimestimes so that you get the sun just rising or just setting when you select those options
tx_Sunrise = 4.9
tx_Sunset = 18.8
?(param1 == 1):goto "SUNRISE"
?(param1 == 2):goto "MIDDAY"
?(param1 == 3):goto "SUNSET"
?(param1 == 4):goto "NIGHT"
?(param1 == 5):goto "24Hrs"
goto "GAMEOPTION"
#SUNRISE
skiptime tx_Sunrise
goto "GAMEOPTION"
#MIDDAY
skiptime 12
goto "GAMEOPTION"
#SUNSET
skiptime tx_Sunset
goto "GAMEOPTION"
#NIGHT
goto "GAMEOPTION"
#24Hrs
skiptime 12.0
?(local server):[] exec "skiptime\ServerSkiptime.sqs"
?!(local Server):[] exec "skiptime\ClientSkiptime.sqs"
goto "GAMEOPTION"
;;;________PARAM2________
#GAMEOPTION
?(param2 == 1):goto "OPTION_A"
?(param2 == 2):goto "OPTION_B"
#OPTION_A
Intro_On = True
goto "PARAM_END"
#OPTION_B
{deletevehicle _x} forEach IntroArray
goto "PARAM_END"
#PARAM_END
?(Intro_On): [] exec intro.sqs
Intro.sqs
;;Do whatever your into needs too and then at the end add the lines
{deletevehicle _x} forEach IntroArray
exit
no need for triggers, just a simple boolean which in this case i named "Intro_ON"
and for your skiptime system, you need 2 scripts
Clientskiptime.sqs
?(local Server):exit
newTime = false
#start
~ random 1
?(newtime): goto "NEXT"
goto "START"
#NEXT
_serverTime = currentServerTime
_timeChange = _serverTime - daytime
skipTime _timeChange
newTime = false
goto "start"
Serverskiptime.sqs
?!(Local Server):Exit
newTime = false;PublicVariable "newTime"
#start
_count = 0
#Loop
_count = _count +1
~2.5
skiptime 0.012
?(_count >= 2): goto "Update_clients"
goto "Loop"
#Update_clients
currentServerTime = daytime; PublicVariable "currentServerTime"
newTime = true; PublicVariable "newTime"
goto "Start"
-
i finaly got to the point of using this... *huff!
it works great! thanks alot guys!