Doolittle 0 Posted May 1, 2003 Howdy...I've put up a template which is the bare basics of this map. What am I doing here? . One script running on server side that respawns all vehicles and also respawns them if they are left empty for a while . One script which gives everyone G36a when they respawn . You can control up to 11 AI players (param2) and they will respawn after a certain amount of time and join you again . Blue markers show where your AI group is . Yellow markers show where your human teammates are . Ammo crates and Med tents repair if they are damaged . Ammo crates fill out with goodies on init (you don't need to addMagazine each one) . It's basically a CAPTURE AND HOLD map, you can make as many hold points as you want & the only thing you would have to change is the names of the flags in init.sqs (flagNames = ["Larche", "Saint Louis", "La Trinite", "Arudy", "Dourdan", "Houdan"]) . By using a marker on the map, players can pick where they want to respawn according to what points they have captured (ala Battlefield) . Vehicles reflect what team you are on (get in a BMP and you're west, it will turn into a T72...get in a M1A1 and you're east, it'll turn into a T80...) This is the equivalencies: westType = ["Cobra", "A10", "AH64", "UH60", "M1Abrams", "Bradley", "M60", "BoatW", "Vulcan", "Truck5t", "HMMWV", "Jeep", "Truck5tReammo", "M113Ambul", "Truck5tRefuel", "Truck5tRepair"] eastType = ["Mi24", "Su25", "Kamov", "Mi17", "T80", "BMP2", "T72", "BoatE", "ZSU", "Ural", "BRDM", "UAZ", "UralReammo", "BMPAmbul", "UralRefuel", "UralRepair"] Keep in mind when these vehicles change, we still make sure they respawn, etc....works if AI gets in a vehicle or player I'm starting a new job on Monday so I don't have the time for OFP I used to have. Â Anyways, these "maps" are my final work with scripts I suppose you could say. Â I hope you can use them or that they'll give people hints to whatever they're trying to do. Peace! Doolittle Share this post Link to post Share on other sites
Doolittle 0 Posted May 1, 2003 Technical: I move the respawn_west and respawn_east when the player clicks on the map for a respawn spot (and when any flag capture happens)...this is great because having people respawn normally into respawn_west (for example), rather than setPosing them means they won't be warped inside a building. Â For the AI soldiers I createUnit them but don't setPos them either so that they won't be inside anything (createUnit is this way). The first EAST unit you put down on the map must MUST have this in their init: playerList = []; soldierList = []; ammoList = []; vehicleList = [] This sets up the list of players, soldiers, ammo crates, and vehicles. Â Don't ask me why, but EAST seems to be the first to "run". Â We want to zero the arrays before anything adds itself to any list and this cannot be done in init.sqs as object initializations are run before init.sqs is. Â The great thing about this "array" approach is that any players that aren't in the game, or soldiers.....don't get added to their lists (since they aren't on the map). I wrote a "get index of x in array" and "find nearest flag to pos according to given side" functions. The VEHICLES will respawn according to whomever owns the nearest flag!! Â If west owns such-and-such town, then a helicopter will spawn in as a Cobra rather than a Mi24. Â This is done here: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vi = vehicleindex select _i _wflag = [getPos _vl, west] call nearFlag _eflag = [getPos _vl, east] call nearFlag _list = westType ?_vl distance _wflag > _vl distance _eflag : _list = eastType _type = _list select _vi <span id='postcolor'> Easy stuff actually! When something gets in a vehicle....that person deletes the vehicle & creates a new one (if necessary...maybe the west guy is getting in a Jeep...so no need to change it)...then that player sends the new vehicle object to the server so that the server can put the new vehicle back into the "respawning vehicles" array. Â We're using publicVariable. ALSO for all of the capture and hold flags....the server is checking to see who is grabbing which flag (done with Take Flag approach, NOT if you're in a trigger or whatever)...when a flag is grabbed, the server sends out a publicVariable to the clients so they know when a flag changes ownership (and thus change the color of the marker of the flag). Â Also, 1 minute after you grab a flag you get a point...like sector control (but with 1 script!! )...these points are sent out from the server.....so there's VERY LITTLE load for the clients as far as them having to run scripts. Can't think of anything else at the moment. Doolittle Share this post Link to post Share on other sites
Doolittle 0 Posted June 13, 2003 Okay, I've updated the map. http://home.earthlink.net/~dbircsak/ofp/ch24liberate.zip now lets you switch positions with your squad mates. I don't believe this has ever been done before. It's really neat. Please help me test this map. Thanks! Doolittle Share this post Link to post Share on other sites
Sinister-tnuC- 0 Posted June 14, 2003 this soudns interesting, i cant test it in MP tho . ill give it a run thru in sp Share this post Link to post Share on other sites
Shashman 0 Posted June 14, 2003 Sad to hear you leave the OFP community Doolittle...Your work was inspiring and always useful and easy to use Well good luck in the new job Share this post Link to post Share on other sites
Doolittle 0 Posted June 14, 2003 Hmm..thanks for saying that Shashman! Â Heh..that's really cool. Â Came out of nowhere. But yeah, if you get a chance...even in single player...check out the thing where you can switch between squad mates. Â It's really REALLY cool. Â I could tell AI to get in tank & go north...tell another to go fly in helicopter west...and I walk on foot some...THEN I switch to guy in tank & I can tread around....THEN switch to the helicopter AI & I'm flying all of a sudden and then switch to the guy walking and I'm going from bush to bush. Â I dunno why BIS didn't implement this. Of course, this is only a THEORY script. Â It works...BUT I haven't tested it in a true environment. Â I am worried it will cause lag with people doing the "warping" all over to different bodies. Oh, and I'm not leaving. Â I just don't have the time I used to. Â When you're out of work you can get far with learning a script and playing all day. Â But now I just have every other Friday & weekends off. Doolittle Share this post Link to post Share on other sites
-radkeff- 0 Posted June 14, 2003 From ur site: Quote[/b] ]I have a new Sony Clie PEG-T615C "Personal Entertainment Organizer"So far, this is the software I've found to be neat and free: Master Thief, Planetarium, Lemmings, ChessGenius, Olive Tree's BibleReader, Astraware's PopCap Games Pack, and the Plucker web viewer biblereader ?! lol  ...now thats vital for todays modern stressed christian... now im gonna test the template.. Share this post Link to post Share on other sites
Doolittle 0 Posted June 16, 2003 I updated the map so that it works with 1.85. Wrote my own function for typeOf, so that 1.91 requirement wasn't needed. The update is up on my site. Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 16, 2003 I don't suppose you'll add a template for the latest version of liberate (what with the player hopping scripts and all). Or perhaps it's just easy enough to decompile and modify. I dunno. Great work though. I was wondering why they didn't add the option to switch units myself. I'm glad someone finally did so. Cheers Doolittle. Share this post Link to post Share on other sites
Baphomet 0 Posted June 16, 2003 Hm... this has potential. This is great. Heh. Only thing is. I suppose Doolittle might be too busy to answer questions now because of the job and such... but does the vehicle respawn script work on time or does it work on distance? I don't like the "too-far-away-respawn" vehicle respawn scripts... and the time based ones are dodgy at times. Is this one decent? I remember one of the scripts worked on a timer and if you weren't in the vehicle when it checked for a driver/passenger, you could conceivably get out of the car for a second... get in again and then it would delete the vehicle or it'd just go "poof" even though you only popped out for a second to get some weapons to load onto it. Anyhow. I was wondering if it would be possible to make a variation on this where instead of time based... you simply had to take over all the flag locations so the enemy simply could not respawn. That'd be interesting. Heh. Share this post Link to post Share on other sites
Doolittle 0 Posted June 17, 2003 The vehicle respawn script, as far as empty vehicle respawn goes is...when you get out a timer starts. Â When you get back in, it stops. Â If you are in a tank, you can leave it out there and it will never respawn, unless destroyed. The only scripts I know of that respawn vehicles if they are left alone are ones that work only if you shoot the tires or something. But, yes, there's a lot of buggy respawn scripts out. Â My favorite one is where you shoot an enemy vehicle...wait...it'll fix itself, you jump in...and then it warps back to the enemy respawn where you can drive all over them. Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 18, 2003 Anyone figured out how to increase the time it takes for the vehicle to time out and respawn? Does the variable _delay = 120 (2 minutes?) determine how long vehicles sit before respawning? Furthermore, and I really neglected to read all in the post... people I've played this with including myself ... hate. The vehicle conversion aspect. Is there a quick and painless way to disable it? It would also be nice to know how to add new vehicles to the list so they will respawn as they are instead of respawning as something else... (ie: col klink's a4 turns into an a10.) If anyone figures out how. Give me a shout. Share this post Link to post Share on other sites
RED 0 Posted June 18, 2003 Sounds great Doolittle I will give it a go tonight, this should make C&H missions nice and easy to make. red Share this post Link to post Share on other sites
Doolittle 0 Posted June 19, 2003 120 seconds is the respawn delay, yes. The vehicles are meant to convert into the appropriate side's version of that vehicle (according to which teams flag that vehicle is spawning closest to)....and the converting into your sides version of a vehicle...well, that's like the whole special thing with this map! If you want to disable the "convert into friendly vehicle thing"...just put exit at the top of the getin.sqs. Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 19, 2003 Well it's an interesting feature but I usually like a bit more variety heh. Â I personally just like the territory capturing aspect, the position switching and the fact that I made it so that -all- positions are capturable so the enemy has to hold at least one position or they spawn way the hell out in nowhere (usually in the water) and thus the opponent wins by annihilation =D Damn.... even with that disabled addons placed in the maps they still seem to respawn as something else.... Share this post Link to post Share on other sites
Baphomet 0 Posted June 19, 2003 Bah. I give up. Trying to modify the vehicles.sqs proved to be harder than finding a ham sandwich up a hog's arse. Share this post Link to post Share on other sites
Doolittle 0 Posted June 20, 2003 I've never figured out addons & their type. Â Hmmm, take gettype.sqf and put your addon type in the list in there. Â Or just delete everything in gettype.sqf and put this in<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">typeOf _this For getin.sqs, just delete everything in the file and have it empty if you don't want the vehicles changing if you get in an enemy vehicle. As for the vehicles turning into the "appropriate" vehicle according to which team flag they're nearest, that's done in vehicles.sqs. Â If you don't want the below code to run then just put _type = _v call getType; goto "create" in place of the following:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vi = vehicleindex select _i ?_vi == -1 : _type = _v call getType; goto "create" _wflag = [getPos _vl, west] call nearFlag _eflag = [getPos _vl, east] call nearFlag _list = westType ?_vl distance _wflag > _vl distance _eflag : _list = eastType _type = _list select _vi This basically says if you are near a West flag, then convert into something west, otherwise go east. Â The types are coded in the init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">westType = ["Cobra", "A10", "AH64", "UH60", "M1Abrams", "Bradley", "M60", "BoatW", "Vulcan", "Truck5t", "HMMWV", "Jeep", "Truck5tReammo", "M113Ambul", "Truck5tRefuel", "Truck5tRepair"] eastType = ["Mi24", "Su25", "Kamov", "Mi17", "T80", "BMP2", "T72", "BoatE", "ZSU", "Ural", "BRDM", "UAZ", "UralReammo", "BMPAmbul", "UralRefuel", "UralRepair"] So Cobra's equivalent is Mi24, etc. I hope this helps. Â What did you want to do again? Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 20, 2003 Thanks for the response. I know you're busy and all. I really appreciate it though. Basically I just wanted to add a little flavor to the mix by throwing in a few respawnable addons. Nothing much really. Perhaps one of Klink's A4s or perhaps some kind of addon vehicle... maybe a KLr250. I tried modifying the init.sqs list so that the addon vehiclenames were in there but obviously that wasn't the solution. Since my CWK_A4f was turning into an A10 when it respawned. That's pretty much it. Just knowing how to toss a few new addons here and there to keep things fresh, knowing they'll respawn and that'd be excellent. Share this post Link to post Share on other sites
Doolittle 0 Posted June 20, 2003 Put your addons at the front of the list & don't forget to fix up gettype.sqf. Let me know if that works, please! Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 20, 2003 It's working great. I followed the instructions you supplied and added a vehicle to beginning of both the westtype and easttype list so they show up as the same addon regardless of the team and it respawned successfully. So everything's great now. I showed it to a few people last night actually and we're going to try it out on the LAN sometime soon. On a side note. Is there any unforseen ill effect that might happen in the game if I just delete the getin.sqs and remove the highlighted line from players.sqs? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #getin ?vehicle _p == _p : goto "continue" _p exec "getin.sqs" <------- goto "continue" I have done so and I've tested it a bit with no adverse results. Share this post Link to post Share on other sites
Doolittle 0 Posted June 22, 2003 Heh. I've seen a couple bugs in my day, but this one's the best so far. I found out if you jump out of a helicopter and you are East, then you will find yourself suddenly inside a Hokum falling to the ground! Pretty funny bug, but now that's fixed. The new version of Liberate is up at my site: http://home.earthlink.net/~dbircsak/ofp/ch24liberate.zip. Baphomet, yes you can kill that line. You've also made me want to make a Liberate for sebnam now. Doolittle Share this post Link to post Share on other sites
Baphomet 0 Posted June 24, 2003 Wow. Yesterday I got to try it over the LAN. So much fun. Everyone I've shown it to enjoyed it immensely. One thing though? It doesn't look like it from upon taking an amateur assessment of the scripts, but you didn't write any script that modifies the way the ai behaves did you? Despite the enjoyment of the game we've met with some really odd problems with the ai doing jackass things... like ordering them to -run away- from a tank and they sprint headlong right into it's path instead. I don't know what it is but it seems the ai for ofp got progressively more stupid after 1.85 Or so it seems. Anyhow. It's great fun. You've breathed new life into OFP multiplayer for me and my friends. Share this post Link to post Share on other sites
Doolittle 0 Posted June 27, 2003 Wow, thanks for saying that, Baphomet. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_type createUnit [_pos, _sgroup select _i, "unit = this", 0.35, "MAJOR"] This is the only AI stuff I do, which is declair their skill level as 0.35 and their "run away" value as MAJOR (which means they shouldn't retreat at all really). Other than that, you're seeing simple OFP AI behaviour. Doolittle Share this post Link to post Share on other sites
KeyCat 131 Posted June 28, 2003 check out the thing where you can switch between squad mates. Â It's really REALLY cool. Â I could tell AI to get in tank & go north...tell another to go fly in helicopter west...and I walk on foot some...THEN I switch to guy in tank & I can tread around....THEN switch to the helicopter AI & I'm flying all of a sudden and then switch to the guy walking and I'm going from bush to bush. Â I dunno why BIS didn't implement this. This is a very cool feature. Thanks for sharing Doolittle! Will come in handy in co-op missions with human OPFOR that control some of the AI squads /Christer (a.k.a KeyCat) Share this post Link to post Share on other sites