mr burns 132 Posted May 23, 2005 well, it´s just some kind of idea that came to me after replying this thread in the O2 forums. it seems that many addons that have great features and potential to be improved are just being forgotten. for example we have: water using multiple pac files for animation ruger mini14 rifle with 2 different scope views inq´s m24 rifle with changeweapon script that makes it possible to change the weapon model via action menu a jam script for weapons (edit: most likely by Mr. Zig, honestly don´t know who made it ): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;;----------------------------------------------------- ;;{_x addeventhandler ["fired", {_this exec "jam.sqs"}]} Foreach Units groupname ;;or ;;this addeventhandler ["fired", {_this exec "jam.sqs"}] ;;Gunjam.sqs ;;----------------------------------------------------- _unit = _this select 0 ?(_this select 3=="FullAuto")||(_this select 3 == "Burst")||(_this select 3 == "Single"):goto "Jam" exit #Jam _x = random 220 ? (_x <= 4):goto "Jam2" Exit #Jam2 _unit playmove "CombatReloadMortarEnd" _unit playmove "CombatReloadMagazine" _unit groupchat "Verdammt, habe Ladehemmung!" exit and i bet there´s much more.. so if you know anything special about ofp addons don´t hesitate to contribute in this thread. maybe it will get spotted by mod teams that pick up some of the ideas, at least it´d be good to know that these features aren´t completely forgotten edit: fixed my engrish a bit @gordy: it´s defined in the config, beyond my understanding..so you´ll better take a look yourself. Share this post Link to post Share on other sites
Gordy 0 Posted May 23, 2005 How do you make two scope views? That'd be cool. Share this post Link to post Share on other sites
exigent 0 Posted May 23, 2005 Hey im using ECP, and i want to use the water mod (the first dl link in your post). How do i do this? Share this post Link to post Share on other sites
hardrock 1 Posted May 23, 2005 Great initiative, MrBurns, but the script you posted is pretty bad. Event handler rule number one: Never call scripts in the fired event handler, or you'll be able to celebrate a lag party. Better make a function of it: init.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">JAM = loadFile "jam.sqf" whateverunit addEventHandler ["fired",{_this call JAM}] jam.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private["_u"]; if(((_this select 2) in ["FullAuto","Burst","Single"]) && (random 220)<=4) then { _u=_this select 0; _u playMove "CombatReloadMortarEnd"; _u playMove "CombatReloadMagazine"; _u groupChat "Dammit, weapon jam!"; }; true Share this post Link to post Share on other sites
mr burns 132 Posted May 24, 2005 Hey im using ECP, and i want to use the water mod (the first dl link in your post). How do i do this? use it like any other skymod, copy into your ofp folder and run the installer. edit: if it´s about running multiple mods you´ve got to edit your flashpoint shortcut like this: -mod=mod1;mod2;mod3 thx hardrock, tried to run the improved script yesterday but must´ve messed something up..reminded me why i don´t stick my nose into scripts that often Share this post Link to post Share on other sites
hardrock 1 Posted May 24, 2005 thx hardrock, tried to run the improved script yesterday but must´ve messed something up..reminded me why i don´t stick my nose into scripts that often I can tell you why ... I simply took over the "_this select 3" from your script which is wrong, the third element of the fired event handler array is "Mode", not the fourth. Fixed in the above snippet. Share this post Link to post Share on other sites
MrZig 0 Posted May 24, 2005 And one more thing. It won't be completley MP compatable. I think I? made that original script? I'm pretty sure mine looked like it. Anyways what'll happen is since fired EH's are global, client #1 might see that _x is 3 while client #3 might see that _x is 22, thus resulting in messed up animations, no groupchat, etc. So you've got to make the random part only local to the unit thats firing it, and then publicvar, and then check if the publicvar'd number is less than 4. Sound confusing? Well I'm sorry but I just woke up Share this post Link to post Share on other sites
hardrock 1 Posted May 24, 2005 And one more thing. It won't be completley MP compatable. I think I? made that original script? I'm pretty sure mine looked like it. Anyways what'll happen is since fired EH's are global, client #1 might see that _x is 3 while client #3 might see that _x is 22, thus resulting in messed up animations, no groupchat, etc. So you've got to make the random part only local to the unit thats firing it, and then publicvar, and then check if the publicvar'd number is less than 4. Yep that's true, I think it would be too complicated to make it MP compatible to really pay off. Share this post Link to post Share on other sites
bohnicz 0 Posted May 27, 2005 Another forgotten feature... A SMG with "moving"(or better: turning?) magazine, made by McHide a year or so ago... ftp://www.gamezone.cz/ofpd/unofaddons2/MGV176final.rar There are some bugs in the Addon, but after all it still works... -bohnicz Share this post Link to post Share on other sites
DanAK47 1 Posted May 27, 2005 It would work fine in multiplayer, with the exception of the groupchat message. Playmove is global. However, if the script used switchmove it would not work. Share this post Link to post Share on other sites
MrZig 0 Posted May 27, 2005 The point I'm trying to make, Dan, is that if you are on a server with 10 other people, it could really bug up. Share this post Link to post Share on other sites
FerretFangs 0 Posted May 27, 2005 The HK pack has some fantastic weapons that change models when the magazines are changed. For instance, there is a HK G8 ( an excellent and VERY rare varient of the HK21 for SPECOPS. ) machine gun that can take standard 20 rnd box mags, 100 round Cmags, and ammo belts. The model changed with with the ammo type. Share this post Link to post Share on other sites
DanAK47 1 Posted May 28, 2005 I can't see it being any more buggy than reloading on a server with 10 people on it. Playmove is global. There is no reason for the script to be running on every client. Share this post Link to post Share on other sites
MrZig 0 Posted May 28, 2005 hmm I suppose you could only do it for the local _unit but then like you/I said, the groupchat wouldnt work. Guess it wouldnt matter MUCH. Share this post Link to post Share on other sites
pajama 0 Posted May 28, 2005 The HK pack has some fantastic weapons that change models when the magazines are changed. For instance, there is a HK G8 ( an excellent and VERY rare varient of the HK21 for SPECOPS. ) machine gun that can take standard 20 rnd box mags, 100 round Cmags, and ammo belts. The model changed with with the ammo type. Makes me really want a Stoner M63 Share this post Link to post Share on other sites