Jump to content

ww2weasel

Member
  • Content Count

    136
  • Joined

  • Last visited

  • Medals

Everything posted by ww2weasel

  1. ?_count == _Many : goto "Exit" _Many = 20 - change to how many times you want to call artillery....
  2. How to get a platoon of infantry to support a Tank in operation Flashpoint w/o scripts. I've used this technique in previous ww2 missions I've made. Brief Synopsis: The sole purpose of making this type of effect, is in a mission - where the opposition is light on tanks & anti-tank weapons. It's really meant for a smaller type mission. However - I have setup 3 of these Trigger induced effects to good effect before. So 3 Tanks with 3 platoons of infantry in support. It plays well when you have limited mines, limited anti-tank capability. The mission becomes daunting as you have to find ways to get at the tank w/o being overrun by the supporting infantry. In this case a tank is given a simple Guard waypoint. Set the options to: open fire engage at will limited movement Aware Add a tank in editor. For my example I give it a name: bt1 Add the platoon of Infantry - 4 squads of infantry in this case. Name the <Group> squads whaterever you like. but in my example in the leaders activation fields: crm1=group this; crm2=group this; crm3=group this; crm4=group this; Now give each squad a waypoint. Use the Hold waypoint. Set the options to: open fire limited movement Aware Ok, very good you have set up the units. Now let us set up 3 triggers that will enable the Infantry to accompany the Tank wherever you send it to in your mission. <Effectively acting as infantry support for the tank. Ok the first trigger we are creating is a logic switch to enable the trigger pair we will set up later to function properly. 1st trigger set condition to true. Also make sure this trigger will only fire off once at start of the game. In activation field put: bt1pos=false; 2nd trigger must be configured to be set off repeatedly. Also give it 20 seconds for min max mid - time settings 2nd trigger set condition to: speed bt1 > 5 && !bt1pos <All this means is: bt1 is traveling at 5+km per hour and bt1pos==false> So whenever the tank <bt1> moves faster than 5km and bt1pos=false - the trigger will activate. in activation field put: [crm1,1]setWPPos [(getPos bt1 select 0)+30,(getPos bt1 select 1)+30,0];[crm2,1]setWPPos [(getPos bt1 select 0)-30,(getPos bt1 select 1)-30,0];[crm3,1]setWPPos [(getPos bt1 select 0)-30,(getPos bt1 select 1)+30,0];[crm4,1]setWPPos [(getPos bt1 select 0)+30,(getPos bt1 select 1)-30,0];bt1pos=true; ok beginning to look complicated, but if you realize what is happening - you'll soon see it's a very simple concept. I am lifting and moving 4 waypoints from the 4 squads that will be supporting the tank. I will be positioning the 4 squads waypoints to form a box around the tank. When the waypoints are moved, the game engine automatically handles movement commands for the infantry. The first of the two trigger pendulum in setup. Too complete the pendulum effect, setup trigger 3 as follows. 3nd trigger must be configured to be set off repeatedly. Also give it 20 seconds for min max mid - time settings 3rd trigger set condition to: bt1pos <All this means is: bt1pos==true> So whenever <logic switch variable> bt1pos==true - the trigger will activate. in activation field put: [crm1,1]setWPPos [(getPos bt1 select 0)+30,(getPos bt1 select 1)+30,0];[crm2,1]setWPPos [(getPos bt1 select 0)-30,(getPos bt1 select 1)-30,0];[crm3,1]setWPPos [(getPos bt1 select 0)-30,(getPos bt1 select 1)+30,0];[crm4,1]setWPPos [(getPos bt1 select 0)+30,(getPos bt1 select 1)-30,0];bt1pos=false; Note the driving force in the pair of triggers making the pendulum effect possible. trigger 2: bt1pos=true; trigger 3: bt1pos=false; Give it a try and see what happens. It should provide a good experience in a carefully balanced game. This sort of setup is not really meant for games with alot of tanks or rpg men. Enjoy! ~WW2Weasel
  3. Whoops - didn't see a second page... Did you convert the ogg file yourself? You may not have the right settings for it to run properly within game. If so - perhaps send file as it can be done in no time by an experienced editor.
  4. hmmm - found an interesting development. Ever get a moment when something you entered in a trigger then tested as good. Doesn't work when you make changes in another trigger. You might scratch your head and wonder what the hell is going on... Then a couple days go by and your head has an awful patchwork quilt look too it as you have pulled out your hair trying to quell the fury that the editor has released in you. Well - sometimes it's a very simple solution - but you must realize first what the problem is before you can fix it. The example I just experienced - I will show you and explain why it happened. The triggers in order of creation below: 1st trigger: Condition: true Activation: New_Vehicle=tank1;publicVariable "New_Vehicle" 2nd trigger: Condition: New_Vehicle==tank1 && !alive tank1 Activation: New_Vehicle=tank2;publicVariable "New_Vehicle" 3rd trigger: Condition: New_Vehicle==tank2 && !alive tank2 Activation: New_Vehicle=apc;publicVariable "New_Vehicle"; 4th trigger: Condition: true Activation: New_Vehicle doMove getMarkerPos "demo"; End result is tanks roll out and as they get killed another takes it place. So it all worked well. Now the problem develops..... I needed to add a movement event to get the other 2 replacement units to move on target marker. So I got lazy and did it with triggers rather than a script. As a result of this decision - I was laying the seeds for failure to get the mission to do what I wanted. I will show you what I did - this resulted in the apparent failure of trigger 4 to work. 1st trigger: Condition: true Activation: New_Vehicle=tank1;publicVariable "New_Vehicle";New_Vehicle doMove getMarkerPos "demo"; 2nd trigger: Condition: New_Vehicle==tank1 && !alive tank1 Activation: New_Vehicle=tank2;publicVariable "New_Vehicle";New_Vehicle doMove getMarkerPos "demo"; 3rd trigger: Condition: New_Vehicle==tank2 && !alive tank2 Activation: New_Vehicle=apc;publicVariable "New_Vehicle";New_Vehicle doMove getMarkerPos "demo"; ok triggers 2 & 3 are ok - but trigger 1 is where the mistake happened - I went back into trigger 1 and deleted - New_Vehicle doMove getMarkerPos "demo"; I already had trigger 4 setup - and decided to keep trigger 4. So I Saved it then went to see the results in editor. I was astonished to see tank1 no longer moving. Hmmm - thought what the hell is up with this. Double checked everything and was at a dead end. So I thought ok - so what did I just change? I added the move to marker command. Ok so the thought process now is to troubleshoot the whole process. All 4 triggers are set to execute at start of mission with no time delay. Ok - I made changes to 3 of 4 triggers.... hmmm ok. With my experience in the computer field - my next thought is fifo <first in first out>. As I pondered this - it's when the solution came to me. Each time you put a save on the trigger it shuffles the fifo order. So technically - the last trigger created is logically the first trigger to be processed as the three other triggers are considered to be newer than the 4th trigger. To test out my thesis... I "contol X" <cut> the trigger out of editor the "Control V" <paste> the trigger back into editor. Thereby reshuffling the fifo once again. Low and behold - problem resolved - Problem was also fixable by giving it a 1 second delay - either approach worked. So to summarize - if something you had in a trigger was just working and now it doesn't - Keep in mind the <fifo> effect. As in this case the problem was I was telling the Variable Next_Vehicle to move before the variable Next_Vehicle was set to tank1. It's just one of those nasty unforseen problems that frustrate OFP editors.
  5. This for the newbs out there unfamiliar with scripting. For Mission Editors only. Ok - say you want to have vehicles as support during your mission. 1st create the amount of vehicles that will be in the game for player to use. Give each vehicle a name - so it can be referenced by trigger later. Also give 1 move waypoint with an open fire, limited & aware waypoint. <You can move waypoint of the unit - so the unit follows it's waypoint.> To use this simple technique. Take one of the vehicles you would like to start off with. Say that vehicle's name is tank1. Now that you have selected the vehicle. create a variable name. If your not going to script but use a trigger, then use a Global name - as this will work in MP as well. Global name for example: Next_Vehicle In a trigger set to condition true; in activation line put: Next_Vehicle = tank1;publicVariable "Next_Vehicle"; then tank1 is now available to your group and will be referenced as the variable Next_Vehicle <The two names are synonymous>. You may use other triggers to move the tank - but when you setup the other triggers be careful to use the variable name - Next_Vehicle. So for every trigger or script - you would be referencing Next_Vehicle not tank1. ok, it's important for you to understand this concept. Reread the paragraph above in case you're not grasping what's happening. :confused: ok applying this technique for your missions other vehicles... if tank1 is killed: in a trigger put in condition line: Next_Vehicle==tank1 && !alive Next_Vehicle in activation field put: Next_Vehicle=tank2;publicVariable "Next_Vehicle"; if tank2 is killed: in a trigger put in condition line: Next_Vehicle==tank2 && !alive Next_Vehicle in activation field put: Next_Vehicle=tank3;publicVariable "Next_Vehicle"; etc... Repeat as many times as you want another vehicle in the mission. So now you have multiple vehicles helping out - but 1 at a time. Now all the other triggers setup for Next_Vehicle - will continue to run substituting the new vehicle in as if nothing has happened. example of getting Ai vehicle to move via triggers or commands in script: [Next_Vehicle, 1] setWPPos getMarkerPos "MarkerOne" [Next_Vehicle, 1] setWPPos getPos player The best possible use for this technique would be to use onmapsingleclick command so a player can call in their vehicle via radio Alpha when they need support. When they call next_vehicle using Radio Alpha, they would open up the map view in editor if not there already - by pressing the letter "M" and clicking on the map where they would like their vehicle to go and lend support. :eek: EXAMPLE onmapsingleclick :j: Using the command onmapsingleclick - you would need to setup in this case Radio Alpha. I included a script and a few references from Mission .sqm to show you how to setup. I grabbed the 1st script with onmapsingleclick I could find in my scripts folder. All you really need to do is setup RAdio Alpha - but I kept explaining in case someone wanted to do more with many radio's. Mission.sqm info: In each radio - you would need to setup up like so. Also included trigger info from mission.sqm to help you understand how to set Radio Alpha thru Radio Juliet Radio Alpha - Condition=disablerad1 && (side player == east) Activ=onMapSingleClick {[_pos,""g_1"",ssg1a,leader ssg1,disablerad1,ssg1,1,Alpha] exec "onclickUnitsE.sqs" Below mission.sqm for added info. class Item3 { position[]={4083.924316,17.258379,5649.841309}; a=5.000000; b=5.000000; angle=-198.276993; rectangular=1; activationBy="ALPHA"; repeating=1; age="UNKNOWN"; expCond="disablerad1 && (side player == east)"; expActiv="onMapSingleClick {[_pos,""g_1"",ssg1a,leader ssg1,disablerad1,ssg1,1,Alpha] exec ""onclickUnitsE.sqs""};"; class Effects { }; }; Radio's Bravo - thru Radio India not listed due to space considerations..... Radio Juliet- Condition=disablerad10 && (side player == east) Activ=onMapSingleClick {[_pos,""g_10"",ssg10a,leader ssg10,disablerad10,ssg10,10,Juliet] exec "onclickUnitsE.sqs" class Item13 { position[]={4039.412598,17.436346,5646.117676}; a=5.000000; b=5.000000; angle=-198.276993; rectangular=1; activationBy="JULIET"; repeating=1; age="UNKNOWN"; expCond="disablerad10 && (side player == east)"; expActiv="onMapSingleClick {[_pos,""g_10"",ssg10a,leader ssg10,disablerad10,ssg10,10,Juliet] exec ""onclickUnitsE.sqs""};"; class Effects { }; }; It's important to set all radios as enabled, this will set a logic switch for the scripts. Also this will set a message as text to read on the relevant radio channel.<Alpha thru Juliet>: Create a trigger set it to true. In activation line type:disablerad1=true;disablerad2=true;disablerad3=true;disablerad4=true;disablerad5=true;disablerad6=true;disablerad7=true;disablerad8=true;disablerad9=true;disablerad10=true;1 setRadioMsg "Infantry";2 setRadioMsg "MG Team 1";3 setRadioMsg "HQ.";4 setRadioMsg "MG Team 2";5 setRadioMsg "Heavy Weapons";6 setRadioMsg "Grenadiers";7 setRadioMsg "Medics";8 setRadioMsg "Sniper";9 setRadioMsg "Flamethrower";10 setRadioMsg "RPG Team"; class Item7 { position[]={4072.394531,17.316566,5634.857910}; a=5.000000; b=5.000000; angle=-198.276993; rectangular=1; age="UNKNOWN"; expCond="true"; expActiv="disablerad1=true;disablerad2=true;disablerad3=true;disablerad4=true;disablerad5=true;disablerad6=true;disablerad7=true;disablerad8=true;disablerad9=true;disablerad10=true;1 setRadioMsg ""Infantry"";2 setRadioMsg ""MG Team 1"";3 setRadioMsg ""HQ."";4 setRadioMsg ""MG Team 2"";5 setRadioMsg ""Heavy Weapons"";6 setRadioMsg ""Grenadiers"";7 setRadioMsg ""Medics"";8 setRadioMsg ""Sniper"";9 setRadioMsg ""Flamethrower"";10 setRadioMsg ""RPG Team"";"; class Effects { }; }; Here is an example script calling up to 10 squads via radio. In this case you could just make it one. ;----------------------------------------------------------------------------------------------------- ;A WH40K script by WW2Weasel ; ;This script to move AI Vehicles around by using Alpha Radio for example. ; ;[position of click on map,marker,group array,leader group,group,disablerad#] exec "somescriptname.sqs" ; ;Example: onMapSingleClick {[_pos,"rus_1",rkk1a,leader rkk1,rkk1,1] exec "onclickunits.sqs"} ; ;Define the above variables to your mission required variables prior to using script. ; ;This script takes into consideration someone already knows how to define array & group for squad. ; ;Here is an example of defining array group for squad. Change numbers incrementally for other squads. In leaders init line type: rkk1=group this;rkk1a=units rkk1; ; ;Feel free to edit as you like; no permission is necessary. ;----------------------------------------------------------------------------------------------------- ?!(side player == east) : exit onMapSingleClick {} _pos = _this select 0 _marker = _this select 1 _grouparray = _this select 2 _leadergroup = _this select 3 _disablerad = _this select 4 _group = _this select 5 _numb = _this select 6 ?(("not alive _x" count units _group) == count units _group):_disablerad=false;_numb setRadioMsg "NULL";_marker setMarkerType "Marker",_marker setMarkerColor "ColorRed",exit ?local player:_marker setMarkerType "Arrow" ?local player:_marker setMarkerColor "ColorGreen" ~5 [_group,1] setWPPos _pos _marker setMarkerPos _pos {_x doMove getWPPos [_group, 1]}forEach _grouparray _leadergroup sideChat "On the way" ;_ncallsign = Format ["%1 moving out!",_callsign] ?local player:_marker setMarkerColor "ColorRed" ?local player:_marker setMarkerType "Warning" ~5 ?local player:_marker setMarkerColor "ColorBlack" ?local player:_marker setMarkerType "Unknown" ~25 ?_numb==1:disablerad1=true,publicVariable "disablerad1",1 setRadioMsg "Infantry" ?_numb==2:disablerad2=true,publicVariable "disablerad2",2 setRadioMsg "MG Team 1" ?_numb==3:disablerad3=true,publicVariable "disablerad3",3 setRadioMsg "HQ." ?_numb==4:disablerad4=true,publicVariable "disablerad4",4 setRadioMsg "MG Team 2" ?_numb==5:disablerad5=true,publicVariable "disablerad5",5 setRadioMsg "Heavy Weapons" ?_numb==6:disablerad6=true,publicVariable "disablerad6",6 setRadioMsg "Grenadiers" ?_numb==7:disablerad7=true,publicVariable "disablerad7",7 setRadioMsg "Medics" ?_numb==8:disablerad8=true,publicVariable "disablerad8",8 setRadioMsg "Sniper" ?_numb==9:disablerad9=true,publicVariable "disablerad9",9 setRadioMsg "Flamethrower" ?_numb==10:disablerad10=true,publicVariable "disablerad10",10 setRadioMsg "RPG Team" exit
  6. Hmmm, ya an oversight. k Ya, always try to drop one in, when I do missions. Might be awhile, most of the missions I have are in WH40k format. Time is something I'm in short supply of. I did have a WW2 mission - that the above script mission was about. 3 peeps in mp had 1 tank, 1 halftrack w/Infantry, 1 jeep w/mg each - as planned support order. Played out well - Had been playing it out in Lan mode mostly.
  7. if you find this as helpful - then goto this link for similar info. http://s1.zetaboards.com/OFPWH40K/topic/655287/1/
  8. If you mean grid coordinate on map? http://www.ofpec.com/ed_depot/index.php?action=details&id=261&game=OFP nikiller's script will work. But how about a trick I picked up awhile ago... open up the mission.sqm and look for: position[]={7263.946777,167.826767,7952.774902}; in order to find position - you need to "swap out" 2nd and 3rd positions in array... Player setpos [7263.946777,7952.774902,167.826767] by using this method you could drop objects in editor - then retrieve their exact positions from mission.sqm - and add to script or trigger....
  9. I was able to get civillian to throw grenades. errrrm - civilian has weapon - "Throw" - meaning you did not use removeAllWeapons man1? Try the below instead: man1 addMagazine "HandGrenade";man1 addMagazine "HandGrenade"; ~1 man1 doTarget police2 ~1 man1 doFire police2
  10. ww2weasel

    To encode a mission

    errrrrm - is he possibly not able to open mission coz he's missing island or addons?
  11. > > Civkill.sqs > > _killerA = _This select 1 ---> lower case _k <Nevermind - capitilization doesn't seem to matter.> > > ?(_KillerA == S1) : _KillerI = S1 ---> upper case _K <Nevermind - capitilization doesn't seem to matter.> > ?(_KillerA == S2) : _KillerI = S2 > ?(_KillerA == S3) : _KillerI = S3 > ?(_KillerA == S4) : _KillerI = S4 > ?(_KillerA == S5) : _KillerI = S5 > ?(_KillerA == S6) : _KillerI = S6 troubleshoot with: hint format ["%1",_KillerI] <Not applicable anymore.> It will show you what the Variable _KillerI is. ____________________________________________________________________ > Penalty.sqs > > _Killer = _This select 0 > > #Penalty > ?_Killer == _Killer is always gonna be true
  12. ww2weasel

    Really Simple Script Question

    in waypoint set a condition that has to be true for the plane to move remove true and replace with: plane_ok_to_move 1st. in trigger setup whatever conditions you want to allow plane to move so in a trigger's activation field - plane_ok_to_move=true for paratroopers: for each group - {_x moveincargo name_of_plane,_x assignascargo name_of_plane}foreach units group_name
  13. ww2weasel

    custom "THROW" problem

    Lol's happens to everyone every now and again....
  14. ww2weasel

    custom "THROW" problem

    Does the completed config have handgrenades defined in ammo class where your config does not?
  15. ww2weasel

    Dragon Warrior UAV Q's

    To put drone into air - look at the below: Tweak as you like - but fiddle with 780 - this will be height - it was needed in my mission - but maybe not yours. excerpt from an old script of mine: #cor1 ~10 ? alive cor : exit "ECA_USMP" createUnit [getMarkerPos _spawn, groupAlpha, "W1 = this", 0.6, "corporal"] cor = "iegf4ubs" createVehicle getmarkerpos "here" w1 moveInDriver cor w1 assignAsDriver cor cor setPos [getpos cor select 0, getpos cor select 1, (getpos cor select 2) + 780] w1 setCombatMode "RED" w1 setBehaviour "COMBAT" exit use the onsinglemapclick command to move around.
  16. ww2weasel

    Problems with mission (lag) :/

    scripts are they yours or made by the community? if yours you may need to publicVariable some things in order for client too process & see. Scripts might possibly need to be made mp compatible. Incubus just about covers why there is lag.
  17. whoops -thought I had a working script. Saw it was not correctly done. Was going too share but it looks as if it's on my other pc.
  18. ww2weasel

    Script and Support WP Qs

    You can do this in a myriad of ways. Really... I will give you some examples then test in mission editor. ok - but you have to do a small setup first. Make a trigger, west, present, once. Then create a very large trigger to encompass a very large area like say 5000 by 5000. if using aircraft have to go 30000 by 30000 at least. <If trigger is too small - units will drop out of the triggers array of west troops initially detected.> Name the trigger wlist. do same for east trigger and name elist. create 4 west & east groups finally select a civillian east cop and setup as player - put the unit between both groups. Setup complete.... In activation field put: you could substitute player with a marker or object or position west side - do one line at a time. {leader group _x doMove getpos player}forEach list wlist; {_x doMove getpos player}forEach list wlist {{_x doMove getpos player}forEach units leader group _x}forEach list wlist I could do more too show you - but I think it would be beating a dead horse. Sometimes the best scripts are simple ones. Not necessary to do below - but would setup a meeting engagement. east side - do one line at a time. {leader group _x doMove getpos player}forEach list elist; {_x doMove getpos player}forEach list elist {{_x doMove getpos player}forEach units leader group _x}forEach list elist for targeting: helps but not assured instant firing unit still needs to acquire - can do a dowatch but if too many units. the unit doing the watching could end up spinning around. {_x reveal _x foreach list wlist}foreach list elist {_x reveal _x foreach list elist}foreach list wlist Watch what happens and think hmmm, where can I use this in my mission. maybe - maybe not... this is aqequate for a simple script: [Group name, target name] exec "Blahblah.sqs" yes use a trigger and use the synchronize and switch option to navigate to different waypoints. and use the below to move the same waypoint or different ones according to your mission needs.. [name of group, 1st waypoint] set waypoint to marker named MarkerOne ---------- Post added at 10:52 PM ---------- Previous post was at 10:43 PM ---------- The below would be good in very large unit actions - if your pc's Hamsters don't die from exhaustion first. {{_x doMove getpos player}forEach units leader group _x}forEach list wlist [name of group, 1st waypoint] set waypoint to marker named MarkerOne
  19. ww2weasel

    Script and Support WP Qs

    Perhaps a simple loop script #start ?!alive leader group1:exit SLX_inv_object setPos getpos Leader group1 ~10 goto "start" [groupOne, 1] setWPPos getMarkerPos "MarkerOne" Translation: [name of group, 1st waypoint] set waypoint to marker named MarkerOne or you could getPos to an object like a game logic, etc... Reference this site for additional scripting support... http://www.ofpec.com/COMREF/index.php?action=details&id=323&game=OFP
  20. ww2weasel

    Killing score

    Sounds like a function routine within the game engine running nested if loops to determine the points. With more than less than conditions.
  21. ww2weasel

    Terminal Mistake???

    if xp: http://www.articlesbase.com/e-learning-articles/changing-file-associations-xp-247352.html
  22. ww2weasel

    Terminal Mistake???

    yes it sounds like an association problem - select open with - choose default program.
  23. ww2weasel

    Terminal Mistake???

    what prolly happened was your son had the description file saved/over written as .txt Instead of reinstalling - next time - save description.txt - by selecting all file types then type description.ext & save.
  24. ww2weasel

    Checking engine damage?

    setHit["motor", 1]; errrrrrrm - this is an ARMA2 command - might have put in wrong forum. This is an opflash forum.
  25. create a trigger triggered by east, west or resistance present. name the trigger - send1 in another trigger: Condition: count list send1 <= 30 you could then synchronize that trigger to kick off all the waypoints of reinforcements to start moving. Do this by dragging synchronization blue line from reinforcement waypoint to the trigger. Do it from waypoint to trigger - rather trigger to waypoint - if not careful you could undo all the previous synchronizations - Having to redo all again. Rinse, lather, repeat to all subsequent reinforcement group's waypoints. Then you'll have time release of units where and when you want. Also you could use scripts for further possibilities - but I'll leave that for another topic & another time.
×