-
Content Count
136 -
Joined
-
Last visited
-
Medals
Everything posted by ww2weasel
-
Trouble with a pepperpotting script
ww2weasel replied to legion7698's topic in OFP : MISSION EDITING & SCRIPTING
group cannot be used as an object for determing distance nor can group name alone be used in dotarget. group is considered an array. So all array considerations must be used in determining distance - etc... -
Trouble with a pepperpotting script
ww2weasel replied to legion7698's topic in OFP : MISSION EDITING & SCRIPTING
{_x dotarget _group}foreach units en1 {_x dotarget _group}foreach units en2 {_x dotarget _group}foreach units en3 _dis1 = leader en1 distance _group _dis2 = leader en2 distance _group _dis3 = leader en3 distance _group -
A simple suggestion: How about perhaps reducing amount of units but enlisting spawn scripts to keep the number of troops in game constant? A constant flow of Ai replacements to keep a player off balance. Smaller number of units if used properly in a mission could allow for a good gaming experience.
-
do you have connection set too - sockets or direct play? port 2302 I noticed I could connect fine in the past but have to set my setting to internet directplay - to connect with a friend in order too serve/play.
-
Have you tried the sockets and direct play options? Is your port 2302 - if not perhaps change. switched to internet to see if other servers populate. Can your friends ping your machine/IP Address? Do you have a router setup maybe a firewall?
-
Problem: Error loading libmod\lib_models\ptrd_sight.p3d (Magic) Has to do with ww2mp lib45 soldier with ptrd. Solution: Reyhard's missing these in Inv_Demo_data.pbo/cfgmodels class lib_ptrd41: Weapon {}; class ptrd_sight: Weapon {};
-
Looking for some pointers on making big missions...
ww2weasel replied to Blitzen's topic in OFP : MISSION EDITING & SCRIPTING
leader group mySoldier1 try defining the above: in init line of unit: mysoldier1=group this years ago I wrote a help file within a script. hope this helps... As the mission designer has the ability to tailor make his unit,marker names - this will make editing additional scripts easier. Simply create a movement script tie it in with a trigger and then your units should begin to move. {_x setBehaviour "AWARE"; _x setCombatMode "RED"; _x setSpeedMode "LIMITED"} forEach units wgrp8 {_x doMove getMarkerPos _targtmrkr}forEach units wgrp8 {_x doFollow leader _grpname}forEach wgrp8 If you need to make an array to gain individual movement for each squad member then: wgrp8a=units wgrp8 Now your group has been added to an array. wgrp8a select 0 --> Will usually refer to the leader of the group - you may also direct commands to Leader wgrp8 To move all units in a group but the leader --> Usually for doFollow command then do this: wgrp8b=wgrp8a - [leader wgrp8] --> Now all members except Leader are defined in new array.... To move other units individually: (wgrp8b select 0) doFollow wgrp8 select 0 (wgrp8b select 1) doFollow Leader wgrp8 In the two examples above note the doFollow targets; they each refer to the same unit. etc... for the amount of units in group. Remember in scripting that first unit starts with "0" so if you have 8 in group - the last in an array is: wgrp8b select 7 -
Yes the other thing I forgot to mention is waypoints will time out after a predetermined amount of time. So by moving a waypoint it actually reactivates it. Not sure if you noticed if you use a seek and destroy waypoint - after a period of time - the waypoint will time out. Also by using & moving a single waypoint you do save yoursef lines of code in a script. And by using the switch properties in a trigger your functionality can increase 10 fold. Just remember to use the appropriate number for the waypoint your using. [_eb, 0] [_eb, 1] [_eb, 2]
-
Another approach... This approach allows 1 set condition in a trigger to set off many very different interactions than the trigger was conditionally setup to handle. Thus stopping the need for many triggers. This is an example on how to get AI to "anticipate" players movement. So you know a player has to enter trigger 1 - but you might like a chance meeting on the way to trigger 2... t1 = trigger <a Trigger named "t1"> _eb= <eb=group this --> in AI unit's init line.> [_eb, 0] <this means group eb's very first waypoint.> ?_player distance t1 <= 50:[_eb, 0] setWPPos getPos t2,this doMove getWPPos [_eb, 0] so all you do is move the AI's group waypoint and all the members will run to --> t2 --> Trigger named 2 this works well - as I've set up very competitive racing against AI. And yes this script can be optimized further... _racer = <name of AI unit> _eb = <eb=group this --> in AI unit's init line.> example script: _racer = _this select 0 _eb= _this select 1 _racer setSpeedMode "FULL" _racer setBehaviour "AWARE" ?!alive _racer:exit #leg1 ?_racer distance t1 <= 50:[_eb, 0] setWPPos getPos t2,this doMove getWPPos [_eb, 0],goto "leg2" ~3 ?!alive _racer:exit goto "leg1" #leg2 ?_racer distance t2 <= 50:[_eb, 0] setWPPos getPos t3,this doMove getWPPos [_eb, 0],goto "leg3" ~3 ?!alive _racer:exit goto "leg2" #leg3 ?_racer distance t3 <= 50:[_eb, 0] setWPPos getPos t4,this doMove getWPPos [_eb, 0],goto "leg4" ~3 ?!alive _racer:exit goto "leg3" #leg4 ?_racer distance t4 <= 50:[_eb, 0] setWPPos getPos t5,this doMove getWPPos [_eb, 0],goto "leg5" ~3 ?!alive _racer:exit goto "leg4" #leg5 ?_racer distance t5 <= 50:[_eb, 0] setWPPos getPos t6,this doMove getWPPos [_eb, 0],goto "leg6" ~3 ?!alive _racer:exit goto "leg5" #leg6 ?_racer distance t6 <= 50:[_eb, 0] setWPPos getPos t7,this doMove getWPPos [_eb, 0],goto "leg7" ~3 ?!alive _racer:exit goto "leg6" #leg7 ?_racer distance t7 <= 50:[_eb, 0] setWPPos getPos t8,this doMove getWPPos [_eb, 0],goto "leg8" ~3 ?!alive _racer:exit goto "leg7" #leg8 ?_racer distance t8 <= 50:[_eb, 0] setWPPos getPos t9,this doMove getWPPos [_eb, 0],goto "leg9" ~3 ?!alive _racer:exit goto "leg8" #leg9 ?_racer distance t9 <= 50:[_eb, 0] setWPPos getPos t10,this doMove getWPPos [_eb, 0],goto "leg10" ~3 ?!alive _racer:exit goto "leg9" #leg10 ?_racer distance t10 <= 50:[_eb, 0] setWPPos getPos t11,this doMove getWPPos [_eb, 0],goto "leg11" ~3 ?!alive _racer:exit goto "leg10" #leg11 ?_racer distance t11 <= 50:[_eb, 0] setWPPos getPos t12,this doMove getWPPos [_eb, 0],goto "leg12" ~3 ?!alive _racer:exit goto "leg11" #leg12 ?_racer distance t12 <= 50:[_eb, 0] setWPPos getPos t0;this doMove getWPPos [_eb, 0],exit ~3 ?!alive _racer:exit goto "leg1"
-
Hi Reyhard - had been recently reworking I think it's Jon's Pnzrwrf42. I could give to you as long as you could get permission from author of addon. I usually tweak addons but normally do not give out to public - becoz of permissions. But since you put out so much effort - it's worth trying to see if you can get permission for editing this addon. Had some things left to do with it - time constraints are a real issue on my side. http://i361.photobucket.com/albums/oo58/WW2Weasel/reskinned_resized_pzwrf42.png Had help resizing -but I reskinned - and tweaked config. Not a modeller <Yet> when I get free time to dabble in it -Changed ammo from Law to Zuni Rockets - for smoke trail. Think I need to work script for AI - very rigid when it comes to targeting. I'm traveling right now - so don't be put off if I don't answer back for a bit...
-
more info plz? Where is your directory located? The errors suggest directory cannot be found. c:\libmod\ is this the root directory for Libmod - or similar loadpoint? <c:\ = Loadpoint> Just take a good look at your directory. You did not dump all Libmod addons into the operation flashpoint directory? Look at this link for mod folder setup - examples: http://forums.bistudio.com/search.php?searchid=1219608 ---------- Post added at 12:07 PM ---------- Previous post was at 11:46 AM ---------- oh - I forgot to say. libmod is script intensive - so it's possible if you change directory name from libmod - to libmod_rus - scripts won't execute as the path cannot be found...
-
Look closely at your texture; do they fall under this criteria? Dimensions are wrong... should be like: 64x64,128x128,256x256,512x512,1024x1024,etc... rle? Compression was left on... not saved with correct extension - like .xcf If not you could send me the file and I could see why it does not work. oh use texview not texview2 - noticed some quirky problems using textures.
-
Turn your image into a .tga file. turn off rle? compression when saving (I use gimp2) Use this tool: Texview open up your .tga file --- then simply rename/save as .pac or .paa -- that simple http://www.ofpec.com/ed_depot/index.php?action=details&id=182 If you cannot see your tga file: Dimensions are wrong... rle? Compression was left on... not saved with correct extension - like .xcf
-
An old variable & array doc someone wrote years back covers this: Setting a value within an array ------------------------------- You can change the value within an array by using the Set command: MyArray set [ArrayPosition, Value] so ["Fred", "Barney", "Wilma", "Thelma"] set [3, "Dino"] will produce ["Fred", "Barney", "Wilma", "Dino"] You can use Set to delete individual elements by the following trick: Set the element you want to change to something recognizable and unique, like "DELETEME". Subtract ["DELETEME"] from the array. MyArray set [3, "DELETEME"] MyArray = MyArray - ["DELETEME"] Will get rid of "Dino"
-
How to get a chopper to unload troops
ww2weasel replied to JohnRobertvh's topic in OFP : MISSION EDITING & SCRIPTING
He meant when you place one unit at a time on the map in the Editor - & if they are close to another unit - the game engine's logic will autolink units into one group. -
hmmm - was on VetServer - might have some missions from it somewhere. Perhaps ask fraghaus if they have the old missions... http://www.fraghaus.com/phpBB3/portal.php?showtopic=10237 Suicide squad setup for arma2 now - but perhaps register and ask if any of the oldtimers have missions... http://www.suicidesquad.co.uk/index.php not sure if this is opflash's hitsquad or not: http://www.armaholic.com/forums.php?m=posts&q=1663&d=0 Hells Circus http://ofp.shafted.com.au/?comm_start_from=750&archive=&subaction=showcomments&id=1266838139& zeus: http://zeus-community.net/jom/phpBB3/viewforum.php?f=21 http://forums.bistudio.com/showthread.php?t=85268
-
1 script to move 10 squads by Radio
ww2weasel replied to ww2weasel's topic in OFP : MISSION EDITING & SCRIPTING
I will try to set this to bis originals - but won't be able to till I get back home this weekend or early week. ---------- Post added at 02:59 PM ---------- Previous post was at 02:41 PM ---------- Also - one of the things implemented in other scripts still not implemented here yet. Is a simple trick to make scripting less tedious. Create a variable call it whatever - main_variable Now - the trick I've employed and works very,very well... Run your other scripts regarding moving AI; or as other peeps like to call Loons. Now what tended to happen as the group or unit was killed off - you needed to jump through hoops to setup the next group - execute scripts etc... to pick up other units to carry the slack - this would mean more scripts running - and if you didn't properly terminate <exit> your scripts the game would lose synch <MP> or lag/crash in <SP&MP> So the trick - is to assign main_variable to either the group Leader - or to an array of units. Now in another trigger - it would be setup to detect if main_variable still had 1 man left in group. If not - then it would swap assignment to a new group Leader or array of units. This way no new scripts are started and the game picks up the new ai and does not do any heavy computing to emplace new units into the virtual calculations etc.. of the game engine. It would of course have to calculate new location of units and manage Ai path to target or whatever your scripts were trying to have happen. Think about it; economy of logic and other processes. Less triggers, & markers too. So in short - main_variable = loon1 or units loon1 if all units dead... main_variable = loon2 or units loon2 main_variable is what is referred to as a globalVariable - good for mp. if on client publicVariable "main_variable" to other systems. You can get really creative - and setup an array - lets say [loon1,loon2,loon3,loon4,loon5] These perhaps are different types of vehicles for AI to use in a mission - createVehicle is always gonna effect processing. But lets say they are in game - perhaps you have a random script to select unit from array. or perhaps units will come systematically until no units left in array. Well you get the idea - the possibilites are endless if using spawned groups. Example - WW2 mission I made. An Armor unit - tank - supports your squad of infantry for most of mission if your lucky. I have it setup - when tank is dead - a halftrack now is your support - for an added boost it carries infantry to be joined to your squad as your group dwindles. -
Hey peeps... I've created "scripts" in the past I've used for MP - with my closed circle of friends... move squad script via radio - using onMapSingleClick. Markers appear indicating what unit is moving - marker changes color and appearance. As units move to new location. So it's possible for player to push his own squad and move 10 squads. Now I've gotten this to work so East,West & Resistance can simultaneously move their own squads. Makes for a thinking mans MP mission. Had some great games as a result. Ex. Squad 1 would be infantry Squad 2 would be Infantry w/MG Squad 3 would be HQ Squad 4 would be Infantry w/MG Squad 5 would be Grenadiers Squad 6 would be Heavy Weapons Squad 7 would be Sniper Squad 8 would be Medics Squad 9 would be Tank Hunters Squad 10 would be RPG Currently - Have MPmissions set for WW2 & WH40K I've created my own configs for WW2 - & WH40K may have new revisions not yet released to public. So when I get a chance (up to 3 weeks from now)- I'll throw a quick Demo together using default addons... ---------- Post added at 02:15 AM ---------- Previous post was at 02:14 AM ---------- Example of script: ;----------------------------------------------------------------------------------------------------- ;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,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";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" ?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 "Infantry with MG" ?_numb==3:disablerad3=true,publicVariable "disablerad3",3 setRadioMsg "Infantry HQ" ?_numb==4:disablerad4=true,publicVariable "disablerad4",4 setRadioMsg "Infantry with MG" ?_numb==5:disablerad5=true,publicVariable "disablerad5",5 setRadioMsg "Heavy Weapons Team" ?_numb==6:disablerad6=true,publicVariable "disablerad6",6 setRadioMsg "Infantry with Grenadier" ?_numb==7:disablerad7=true,publicVariable "disablerad7",7 setRadioMsg "Medics" ?_numb==8:disablerad8=true,publicVariable "disablerad8",8 setRadioMsg "Sniper Team" ?_numb==9:disablerad9=true,publicVariable "disablerad9",9 setRadioMsg "Tank Hunters" ?_numb==10:disablerad10=true,publicVariable "disablerad10",10 setRadioMsg "RPG Team" exit ---------- Post added at 02:19 AM ---------- Previous post was at 02:15 AM ---------- Also if two out of three people are playing - You can get mp Session to find out which group has no human player and assign tasks for the AI group to make the game more interesting than a straight out plaver vs player mission...
-
1 script to move 10 squads by Radio
ww2weasel replied to ww2weasel's topic in OFP : MISSION EDITING & SCRIPTING
If you have wh40k mod can send you mission. Be back in a day or two. Scripts are for concept - as markers etc... need to be placed in mission. -
1 script to move 10 squads by Radio
ww2weasel replied to ww2weasel's topic in OFP : MISSION EDITING & SCRIPTING
Sorry peeps busy with real life there for a few months. For those of you familiar with scripting; head over for peak at scripts. 10 radio calls / 4 companies. Use addaction to manipulate scripts to control companies you issue radio commands too... goto link for update: http://s1.zetaboards.com/OFPWH40K/topic/2855103/1/ -
New Icons developed and under development to help give a facelift for the overall presentation within the Mapmode while ingame. http://s1.zetaboards.com/OFPWH40K/topic/2491470/16/#new
-
I know Fab has been working outside his own country for awhile. So the Demands of his job have prolly dictated how much time he has for the mod. He may still be working on things in dribs and drabs.
-
where does this script fail for you? It looks ok for fuel and repair. What I see: #step1 hint "rearming!" ?(_chop ammo "Bullet30" == 500): goto "step2" _chop AddMagazineCargo ["MachineGun30", 5] ~0.2 goto "step1" Problem with your script - is the ammo - has to equal max ammo for magazine to exit loop. Ammo - does not go down unless you squeeze off rounds or reload another magazine. So your doomed to loop. Been away from scripting for a bit. But below was something I was working on. I had a version that worked - not sure if this is it or not... oooops another function was needed to kick it off.. Well at least you can see what I did to get ammo reload. ;Script made for WH40K MOD Ver. 3 ;Edited by WW2Weasel ;This script will count and replenish primary secondary weapon Mags for a unit. ;This will keep player stocked with 2 mags until the player exhausts number of mag allowance in ammopouch... ;[unit name,number of mags to put in ammo pouch script]exec "ammopouch.sqs" ;Be sure to preprocessFile the Function - important as the function needs to be handled differently then a script... ;Example: getmag=preprocessFile "getmag";[unitname,10] exec "ammopouch"; ;Permission to modify granted... As long as you give some credit to WH40K mod. _unit = _this select 0 _ammopouch = _this select 1 _ammopouch2 = 3 _mags={} _mags2={} #start _primary_weapon = primaryWeapon _unit _magcount = count magazines _unit _magazines = magazines _unit ;hint format["%1,%2",player hasWeapon _primary_weapon,count magazines player] ?_ammopouch==0 || !alive _unit:exit [_unit]call getmag ~5 ?_unit==player:hint format ["%1",_mags] _totalMags=("_x == _mags" count magazines _unit) _totalMags2=(count magazines _unit) ?(_plysund &&(_totalMags <= 2 && _ammopouch >= 1)&&(_unit hasWeapon _primary_weapon && _totalMags2 <= 5)):_unit groupChat "Rummaging in Ammopouch for spare Mag.",playSound "rummagepouch",_unit addMagazine _mags, _ammopouch = (_ammopouch - 1) ~15 _plysund=true ?secondaryWeapon _unit != "":goto "start2" goto "start" #start2 ?_ammopouch2==0 || !alive _unit:exit _secondary_weapon = secondaryWeapon _unit _magcount = count magazines _unit _magazines = magazines _unit [_unit]call getmag ~10 ?_unit==player:hint format ["%1",_mags2] _totalMags2=("_x == _mags2" count magazines _unit) ?(_plysund &&(_totalMags <= 1 && _ammopouch2 >= 1)&&(_unit hasWeapon _secondary_weapon && _totalMags2 <= 5)):_unit groupChat "Rummaging in Ammopouch for spare Missile.",playSound "rummagepouch",_unit addMagazine _mags2, _ammopouch2 = (_ammopouch2 - 1) goto "start" On the road traveling so might be awhile before I can reply again.
-
1 script to move 10 squads by Radio
ww2weasel replied to ww2weasel's topic in OFP : MISSION EDITING & SCRIPTING
The Scripts will now be called "Grand Army" - to be completed in roughly 2weeks time - just needs testing and that is my only free time to test in mp. Check in 2 weeks time here: Below is link to WH40K site - most likely the first Addons related Demo to be set up: http://s1.zetaboards.com/OFPWH40K/topic/2855103/1/ -
prevent <unit x> join player
ww2weasel replied to SaintPier's topic in OFP : MISSION EDITING & SCRIPTING
use removeAction to remove the action you don't want another player to use... http://www.ofpec.com/COMREF/index.php?action=details&id=262&game=OFP http://www.ofpec.com/COMREF/index.php?action=details&id=5&game=OFP