ww2weasel 10 Posted January 23, 2010 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... Share this post Link to post Share on other sites
ww2weasel 10 Posted January 25, 2010 (edited) Ok after some thinking I've up'd the stakes... Now 1 player per 3 sides can call up to 40 different squads each using addaction controllers /10 radio channel per addaction controller. Currently doing all my testing in a WH40K environment. So an East Player for Example can choose which of 4 companies he wants to move. 1 Company is Armor vehicle types while the 3 other companies are Infantry types. He can selectively pick and choose which company and which squad. Then if he wants - just move lets say a sniper team from 1st company. Then he decides to send recon assets from the Armor Company. Also perhaps a Rifle team from Second Company and maybe medics from 3rd company. All this is possible via the way I've scripted things. I've made it very script friendly for MP. I won't be able to test in mp for 3 weeks - on the road till then. Can't wait perhaps open up new ways to play death matches... Oh by the way to cut down on lag - 6 or less in squad. 2 Armor types - 3 recon types = 6 crew per armor/recon. Edited January 25, 2010 by WW2Weasel Share this post Link to post Share on other sites
ww2weasel 10 Posted January 29, 2010 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/ Share this post Link to post Share on other sites
ladie from hell 2 Posted January 29, 2010 I have seen some 1/2 a dozen scripts that have the workings of such game play and I love them all .... some MP missions that come close to this kind of action are CTI missions ...but with added fire power. but this one is very easy on my flint stone pc, the Hamsters are not running the wheel off the rim just to get anything to go ... also with the fact that the scripts/mission has on map markers to show the player where his units are is another thing I love about this.. but only the players units markers can be seen by the player... so not to give away the others locations ... I have played this mission in testing and I have never been able to play them the same way twice ... I have done the same orders in 5 mission of play.. and all came out different I was even wiped out in one game by the AI .. just cause I got to cocky and thought I had the AI beat .. OOPS my bad .. as of now the testing is all reg infantry units and some armor , but it will be brought up to using any and all units from the OFPWH40K mod, and to bring this into the ww2 mod... the Eastern front will never be the same .. the only thing that will limit this scripting will be the OFP game engine and the people's computers . LFH Share this post Link to post Share on other sites
wuschel 10 Posted March 23, 2010 Hello, this sounds interesting. Are there any news on that one? Cheers, wuschel Share this post Link to post Share on other sites
ww2weasel 10 Posted July 3, 2010 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/ Share this post Link to post Share on other sites
zulu1 145 Posted July 3, 2010 Good to see you're back Weasel. Will give your script a try as soon as I can. Share this post Link to post Share on other sites
ww2weasel 10 Posted July 3, 2010 (edited) 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. Edited July 3, 2010 by WW2Weasel Share this post Link to post Share on other sites
NacroxNicke 11 Posted July 8, 2010 Can you upload the demo mission for Wh40k? or a demo mission for the vanilla OFP, because I couldn't figure out myself how I can get it to work :/ Thanks Share this post Link to post Share on other sites
ww2weasel 10 Posted July 8, 2010 (edited) 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. Edited July 8, 2010 by WW2Weasel Share this post Link to post Share on other sites