TheMcDeth
Member-
Content Count
41 -
Joined
-
Last visited
-
Medals
Everything posted by TheMcDeth
-
How can i turn off the streetlights
TheMcDeth replied to CommanderMJ's topic in OFP : MISSION EDITING & SCRIPTING
Anyone know if the lights are reset at the start of a mission? At least earlier if you switched the lights off, they would remain off also in the next mission on the same island... I would recommend to destroy the lights... object ##### setdammage 1 At least for the lights in FDF East Border it was enough to set dammage to 0.5 to shut them off. Don't know if Goeth used some special lights in that island though. -
What grabs you most about a campaign/mission?
TheMcDeth replied to Ex-RoNiN's topic in USER MISSIONS
Realism, realism, realism and realism. Modern infantry firefights do not cause huge amount of dead bodies lying everywhere. Only the civilians are killed in hundreds. I would say that main thing to accomplish realism is to reduce the amount of enemies. Make them run away more easily if they do not like the odds. Increase skill of enemies and place them in difficult places so they have cover. Use the enemies intelligently and maybe try to use scripts that give AI's a little bit more brains. -
Empty vehicle = live civilian?
TheMcDeth replied to Luk's topic in OFP : MISSION EDITING & SCRIPTING
Trigger with activation "civilian not present" does not work? Strange... Anyway you can name the units and make an array of the names. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> (?!local server):exit #loop _units=[c1,c2...cn] ~10 _i=0 "if (alive _x) then {_i = _i + 1}" foreach _units ?_i > 0 : goto "loop" var=1 publicvariable "var1" exit This script is run only on server. So add gamelogic and name it "server" and run this script from init.sqs. Then add a trigger to check the status of var1 and execute whatever you want. It does not matter if some of the units in the _units array are there or not. It will work anyway. -
It reguires work, but maybe it is somehow possible to do something for the briefings. As far as I know all that you can change is objectives. I once made a mission with 5 objectives that were selected by random. It requires the following steps to accomplish that: 1) Create mission markers that you need 2) Create Briefing with multiple objectives 3) Create script that selects one of the objectives by random - This script hides other objectives and moves markers to desired positions 4) Create script that checks if the objective has been accomplished Works well with a&d missions, but never tried it in coop or any other mission type. Problem is that you need to put lot of effort into building the briefing and makin sure all markers are in position etc. But the biggest pain in the ass is to figure out which scripts to run locally on each side and which only run on server
-
This script requires the following objects in the mission: Soldiers named f1...f20 Game logics named: Server, raah, home Chopper named heko (set flying without any waypoints) Trigger to activate the script Move Gamelogic raah where you want the chopper to pick up the squad and gamelogic home to where you want them to go.
-
Also you might want to think is it always necessery to run all scripts locally or should they be run only on server. Using publicvariable broadcasts things to all clients so it is not necessery always to run scripts everywhere. Also you can set the wait for loops even higher than 0.5 - 2. I use ~10 quite commonly for things that are not very urgent. One thing that I have been wondering about is that should sometimes scripts be used instead of triggers. For example if you want to check if certain targets are destroyed or not, you could do this in a server side script with for example~10 wait easily. Or you can do this in a trigger. Which one is more CPU friendly? Also does it make more sense to run many things in one script or should one try to accomplish as many things as possible in one script. Combining multiple scripts into one makes them more difficult to make reusable in other missions.
-
I tried combining names in a script as follows <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> target="v"+format["%1",raah] raah is an integer from 1 ... 10 I then have 10 different objects in a mission named from v1 .. v10 I then checked that the combining of the number and letter is correct in hint dialog <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">hint format["%1",target] When I try to use the "target" variable in another command I get an error message about the variable being a string and not object. So my question is can I change a type of a variable from string to object? Or are there any other possibilities to achieve the same
-
Problem with variable types
TheMcDeth replied to TheMcDeth's topic in OFP : MISSION EDITING & SCRIPTING
Thanks to all who helped me. I reduced the length of one code to about 15 % of the original. When I use the same code in many missions I now have a very easy job of editing the code for each mission. -
Problem with variable types
TheMcDeth replied to TheMcDeth's topic in OFP : MISSION EDITING & SCRIPTING
Thanks. I have to try it when I get back home in the evening. I thought there must be easier way than what I was trying. -
I have no other idea to change the time than using skiptime. The only drawback of skiptime is that you have the duration of the mission changed in the debriefing.
-
I am planning a somewhat different approach for a&d mission and I would like to know if it is possible to make two or more different briefings for one mission. Also is it possible to show different intros for Resistance and East players? I was thinking something like below... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ?(side player)==resistance : goto "res" player exec "rusintro.sqs" exit #res player exec "resintro.sqs" exit Third possibility is to give orders with radio commands in beginning of the mission. But I would like to avoid this if possible, since some players just never seem to listen or pay attention...
-
Multiple briefings / multiple intros
TheMcDeth replied to TheMcDeth's topic in OFP : MISSION EDITING & SCRIPTING
Thanks for the help... I think I finally solved it by just simply defining the objectives correctly and hiding unnecessery objectives. So the mission works like this: Attackers have 5 alternative objectives and one is selected randomly. All objectives are hidden and correct one is then activated. Also the target markers are moved to the correct positions. Defenders on the other hand have no idea what is the real objective of attackers. Since all the possible targets are in a relatively small area the defenders have to divide the forces more realistically around the designated area. -
Create trigger with type End #1 or whatever number you want. Then syncronize or group (don't remember which it was... so test it) the trigger with the pilot.
-
Switching streetlights on and off?
TheMcDeth replied to egwal's topic in OFP : MISSION EDITING & SCRIPTING
Well tried it yesterday with FDF East Border Island and it worked fine. It does have an annoying delay though... -
Switching streetlights on and off?
TheMcDeth replied to egwal's topic in OFP : MISSION EDITING & SCRIPTING
I would recommend against switching streetlights off. When you switch them off, they will remain off, even in the next mission you play. So one way to go around this to damage the lammpost. object <id of object> setdammage 0.5 That will damage the lamp and "switch" it off. Downside of this method is that there will be a delay when the lights are switched off... -
Or you can make sure the artillery hits the targets <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _shell = "Shell125" camcreate getpos shilka1 ~1 _shell = "Shell125" camcreate getpos shilka2 ~1 _shell = "Shell125" camcreate getpos shilka3 ~1 _shell = "Shell125" camcreate getpos shilka4 ~1 exit Add these lines to a script and run it at the same time as your artillery fires.
-
I don't remember this being asked before. Have you tested the compatibility with FDFmod? Are normal OFP/FDFmod soldiers any match against Marpat / Morpeh soldiers? Anyway the all the soldiers look awesome. I am looking forward to this addon almost as much as FDFmod v1.1
-
How to turn all lights off on an island
TheMcDeth replied to tracy_t's topic in OFP : MISSION EDITING & SCRIPTING
I would guess they have made it with a scrÃpt. example: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_n=random(15) _i=0 ~random(10) #loop ~random(50)/100 _i=_i+1 object XXXXX switchlight "on" ~random(50)/100 object XXXXX switchlight "off" ? _i==_n : exit goto "loop" The problem with switchlight is that if you switch them off, you need to switch them back on. Otherwise when you do not do this, you will have the lights switched off when you try the mission next time or even when you run another mission on the same island. Does anyone know if this feature has been removed? -
Nice but where's the artillery for East?
-
I do not know about BTR-80 but for example Patria XA-185 has top speed over 120 km/h. I would not like to sit on top of that thing while driving full speed. Of course you cannot drive that fast in most roads, but still I would say that in any kind of road / terrain, the speed should be limited if there is someone sitting on the roof. Other possibility is that there is a small propability (1 - 5 % for example) that soldiers dropping off from the roof if speed is more than say 75% of the max speed for each terrain type.
-
Make ai pilots disengage?
TheMcDeth replied to kueppcera's topic in OFP : MISSION EDITING & SCRIPTING
You tried: unit setbehaviour "careless" ? -
Very nice addons. But maybe some things I would do differently to balance things a bit. 1) Radar for gunner for the tanks? It does not seem realistic and it practically gives too much advantage against even MBT's at long ranges (as mentioned before already) 2) The dispersion in heavy MG's seems to be too much in my opinion. Normally high caliber machineguns are very accurate at long ranges. Good tripods effectively remove the recoil of the guns adding to the accuracy of the weapons 3) Firing rate of MG's and 23mm AA guns too low
-
Just download dePBO from OFPEC. I think there are some programs that can create the briefings for you. Search for them also from OFPEC. I personally like to make them with notepad but then again I am a masochist...
-
Howabout the following added to end trigger condition: getpos chopper select 2 == 0
-
So how about doing it with a script as below. First name the tanks t1, t2 ... tn. Then add line [] exec "targets.sqs" to init.sqs file run the script. Then make an end trigger with condition varend==1 to end the mission. This way you need one trigger and one script to accomlish the task. Also you need to name the units. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "targets.sqs" _targets=[t1,t2,t3,t4,t5,t6,t7,t8,t9....] #loop ~5 _raah=0 "if (alive _x) then {_raah = _raah+1}" foreach units _targets ? _raah != 0 :goto "loop" varend=1 exit Â