partieboi 0 Posted August 19, 2003 hi im new 2 mission editing and i want 2 make my mission go day and night using the skiptime script,i ve got the skiptime script but i don't know what 2 do with it like in a trigger, were 2 put the tripper and things like that someone plz help ive searched the forum but can't find anything Share this post Link to post Share on other sites
bn880 5 Posted August 19, 2003 Post the script first of all then someone will probably come by and tell ya. Share this post Link to post Share on other sites
RED 0 Posted August 19, 2003 Pasting the script you are using here would be good, if it is the script I think you are using you need to activate it by putting the following in a triggers onactivation field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[500] exec "nameofscript.sqs" How you get the trigger to activate is up to you, it depends on what you want to set off the change of time. RED Share this post Link to post Share on other sites
partieboi 0 Posted August 19, 2003 _timeSkip = _this select 0; _counter = 0 _oneMinute = 0.016667 #start skiptime _oneMinute ~1 _counter = _counter + 1 ? _counter < _timeSkip : goto "start" thats the script red i saw it in one of the posts, how do i activate it wiv a trigger Share this post Link to post Share on other sites
partieboi 0 Posted August 19, 2003 or this one which ones the best _skip = 60 _nights = 0 _days = 1 publicVariable "_skip" publicVariable "_nights" publicVariable "_days" ~15 Hint format ["Day %1",_days] #skip ~_skip skiptime 1 ?18.0 <= DayTime and 19.0 >= DayTime : _nights = _nights+1; Hint format ["Night %1",_nights]; _skip = 60 ?6.0 <= DayTime and 7.0 >= Daytime : _days = _days+1; Hint format ["Day %1",_days]; _skip = 60 goto "skip" Share this post Link to post Share on other sites
RED 0 Posted August 19, 2003 Well it depends on a couple of things, why is the time accelerated? How quickly do you want the time transaction to occur? When in the mission is it accelerated and how do you want to activate the acceleration? Answer these questions and someone will be able to tell you what you want. RED Share this post Link to post Share on other sites
partieboi 0 Posted August 19, 2003 well i want it 2 start day then about 10minutes changes 2 night then 10minutes again changes back 2 day thats how fast, how 2 activate it is when its on the loading screen activate it then just before the briefing or just after briefing Share this post Link to post Share on other sites
RED 0 Posted August 19, 2003 Ok then, use this script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _timeSkip = _this select 0; _timeSkip = _timeSkip * 60 #init _counter = 0 _oneMinute = 0.016667 #start skiptime _oneMinute ~1 _counter = _counter + 1 ? _counter < _timeSkip : goto "start" goto "init" That script will keep looping, the way to activate that is. Make a trigger on the map (anywhere) in the triggers condition field 'this' will be written in it, change 'this' to 'true'. Setting the trigger to true will make sure the trigger is activated just after the briefing. In the triggers on activation field put this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[time in hours] exec "timeskip.sqs" You will want to change the time in hours depending on what time the mission starts, also take into account that the season will make a difference as it gets darker earlier at different times of the year. RED Share this post Link to post Share on other sites
partieboi 0 Posted August 19, 2003 tnx m8, worked gr8, cud u help me out with another thing im makin a cops and robbers map 4 me n my friends and i want 2 make it so one person owns car dealer another owns something else but i want it so theres a gate that only the owner can unlock and lock can i do that and how? Share this post Link to post Share on other sites
RED 0 Posted August 20, 2003 I am not sure what you mean? If you showed me the script you are using to unlock the gate I will be able ot help you. RED Share this post Link to post Share on other sites
partieboi 0 Posted August 20, 2003 i aint gotta script like, i don't know how 2 do scripts, ive seen this on another mission, example: say u own the car dealer and say u put a fence where u want the gate, but i want the owner 2 have an action in the menu saying open gate when the owner clicks that the fence goes and theres a gap then if the owner wants 2 close gate again from action menu he clicks close gate and the fence reappears i hope that helps Share this post Link to post Share on other sites
RED 0 Posted August 20, 2003 Right you will need to name a fense you want to use as the gate, name it gate1. You will also need to name the owner and make a gamelogic (name it g1) place this near the gate. You will need to make 2 scripts, 1 script will give the action menu and the other will control the gate. Detect.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _owner = _this select 0 _gate = _this select 1 _gamelogic = _this select 2 _gamelogic setpos getpos _gate gate = _gate gatepos = getpos _gamelogic ?player != _owner: exit #start ~0.5 ?(_owner distance _gate) > 4: goto "start" gateaction = _owner addaction ["Open gate", "gate.sqs"] @gateopen || (_owner distance _gate) > 4 _owner removeaction gateaction ?gateopen: goto "close" goto "start" #close ~0.5 ?(_owner distance _gamelogic) < 4: gateaction = _owner addaction ["Close gate", "gate.sqs"] @!gateopen || (_owner distance _gamelogic) > 4 _owner removeaction gateaction ?gateopen: goto "close" goto "start" gate.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?!gateopen: gate setpos [0,0,0]; gateopen = true ?gateopen: gate setpos gatepos; gateopen = false To activate the script: [name of owner, gatename, g1] exec "detect.sqs" Please note I have not tested this so I have no idea if it will work as I can't test it with no OFP CD RED Share this post Link to post Share on other sites
partieboi 0 Posted August 20, 2003 do i have 2 change anything in the detect.sqs like the owner change 2 cardealer where do i put this [CarDealer, gatename, g1] exec "detect.sqs" cardealer is the owners name oh and tnx 4 ur gr8 help Share this post Link to post Share on other sites
partieboi 0 Posted August 20, 2003 i tryed it and it came up with this at the top of screen 'gate |#| _gate': error reserved variable in expression when i clicked open gate in action menu the fence didnt disapper Share this post Link to post Share on other sites
RED 0 Posted August 20, 2003 Change gate.sqs to this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?!gateopen: gatename setpos [0,0,0]; gateopen = true ?gateopen: gatename setpos gatepos; gateopen = false And detect.sqs to this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _owner = _this select 0 _gate = _this select 1 _gamelogic = _this select 2 _gamelogic setpos getpos _gate gatename = _gate gatepos = getpos _gamelogic ?player != _owner: exit #start ~0.5 ?(_owner distance _gate) > 4: goto "start" gateaction = _owner addaction ["Open gate", "gate.sqs"] @gateopen || (_owner distance _gate) > 4 _owner removeaction gateaction ?gateopen: goto "close" goto "start" #close ~0.5 ?(_owner distance _gamelogic) < 4: gateaction = _owner addaction ["Close gate", "gate.sqs"] @!gateopen || (_owner distance _gamelogic) > 4 _owner removeaction gateaction ?gateopen: goto "close" goto "start" That should work, I hope RED Share this post Link to post Share on other sites
partieboi 0 Posted August 20, 2003 it still don't work unless ive put this in the wrong place or its been typed wrong  [CarDealer, gate1, g1] exec "detect.sqs" that gate message don't come up any more Share this post Link to post Share on other sites
RED 0 Posted August 21, 2003 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?!gateopen: gatename setpos [0,0,0]; gateopen = true; exit ?gateopen: gatename setpos gatepos; gateopen = false; exit It works now, I just tested it. RED Share this post Link to post Share on other sites
partieboi 0 Posted August 24, 2003 the gate still didnt work 4 me i don't know i mite be doin something wrong but it doesnt matter now and tnx 4 ur help Share this post Link to post Share on other sites