Jump to content
Sign in to follow this  
Sniperwolf572

Be a hero...

Recommended Posts

OK, some of you may have noted a little "plugin" addon that I'm working on, something most of you have asked for, dragging.

We saw how nephilim did it (awesome work, made me start this), but to me it looked weird watching the guy lay on the ground and follow me as if he were chained to me (no offence, its still great).

Here is a link on how it should work, and it does work in single player with A.I. as injured person. Limtation is that A.I. is not able to preform it correctly, the video was shot just to show how it looks. I will upload another video that shows the current state of the addon sometimes later.

But I have ran into a problem, (not understanding MP scripting, and this being aimed mostly at MP coop) the thing doesn't work in MP, and my poor MP scripting knowledge is to blame.

So anyone willing to help me to port this to MP, please do contact me.

Also, you may have noticed that walking animation looks robotic, I need help with that too, its only one anim.

This plugin is planned to be incorporated into following addons:

- SafetyCatch's Marine Pack

Share this post


Link to post
Share on other sites

Currently no, one UserActions entry has to be inserted in config.cpp.

EDIT: It could possibly work if you add that user action from editor. Haven't tested that, but it should work.

Share this post


Link to post
Share on other sites

Hi,

Looks good so far. About the animation looking robotic.

You only need to reduce the speed of the drag vehicle, then it should look ok. It's just moving to fast for the walking animation atm.

If your still having problems with the MP side, you could always send me a copy of the addon.

Share this post


Link to post
Share on other sites

i made a suggestion on ofpec - dont forget to mention me in the credits if it works - hehe wink_o.gif

Share this post


Link to post
Share on other sites

Finally got around to checking out the vids. Nice work on this. thumbs-up.gif In addition to what UNN said about the speed (well, either slow the guy down, or speed up the animation), you'll also want to introduce a lot more up-down motion. This, imo, is the reason for it looking robotic.

Share this post


Link to post
Share on other sites

@ROBINO:

Thanks I will try your suggestion, I don't have an MP server to check this atm.

@LoTekK:

Yeah, I am aware, but I suck at making dynamic (read: moving) animations.

EDIT: ATM Animations are placeholders, I want to make the addon usable first, then comes the eye candy. tounge2.gif

Share this post


Link to post
Share on other sites

note on the anim, it looks good, other than yes youve got a few speed problems and some jumping right leg syndrome :P(well not literally jumping, ut it sorta slids in to fast)

the right leg slides down to fast once the left leg has gone back, and also the toes/feet dont actually react at all smile_o.gif

but then again its only a placeholder but still good go at it! smile_o.gif

Wildo

Share this post


Link to post
Share on other sites

Well, anyways, ROBINO's solution didn't work, so I'm gonna post the script in it's current state for everyone to view, might get better support that way.

Important lines from config.cpp:

Quote[/b] ]class UserActions

{

class DragComrade

{

displayName="Drag";

position="zbran";

radius=2;

condition="(This!=Player) And ((GetDammage This >0.7) And (GetDammage This <0.95))";

statement="[This] exec ""\TEN_DragSystem\Scripts\drag.sqs""";

};

};

drag.sqs:

Quote[/b] ]

? !(local Server) : exit

_Injured=_This Select 0

_DragBy=Player

~0.1

_dragvehicle = "TEN_DragVeh" createVehicle getPos _Injured

_inj_original_veh = vehicle _injured

_drag_original_veh = vehicle _dragby

~0.2

_Injured assignAsCargo _dragvehicle

_Injured moveInCargo _dragvehicle

_DragBy assignAsDriver _dragvehicle

_DragBy moveInDriver _dragvehicle

@(vehicle player != _drag_original_veh) && (vehicle _DragBy != _inj_original_veh)

#check

~1

? count crew vehicle _dragvehicle == 1 : goto "eject"

? count crew vehicle _dragvehicle >= 2 : goto "check"

#eject

_Injured action ["eject", vehicle _Injured]

_DragBy action ["eject", vehicle _DragBy]

deleteVehicle _dragvehicle

exit

Also testing conditions and results with the above script:

Player 1 server

Player 2 client

Situation 1 - Player1 drags Player2:

Drag vehicle created, Player 1 jumps in Player 2 remains stationary, Player1 is ejected because vehicle only contains him

Situation 2 - Player2 drags Player1:

Clicking "Drag" option, nothing happens

Situation 3 - Player1 drags AI:

Works fine for Player1, Player2 can see Player1 dragging AI

Situation 4 - Player2 drags AI:

Impossible, same result as situation 2

Share this post


Link to post
Share on other sites

woah! biggrin_o.gif .

I really hope you pull this off, this, and a way to carry a person on your back, or even use two persons to carry somebody else (faster) would be sheer awesomenessish.

The addon could also introduce a Global thingy that introduces wounds that are too serious to continue walking. people could add this in their own missions, etc. smile_o.gif

Share this post


Link to post
Share on other sites

this sounds like a great project, hope you get it working in mp, and also i hope that you can make a standalone script that won't require safetys marines or maybe somehow beeing able to do a initline command like scripts that came with bas choppers biggrin_o.gif

Share this post


Link to post
Share on other sites

Addon is standalone, and anyone will be able to incorporate it into other infantry addons. As you can see, I'm not refering to SFTY_Marines in any part of the script or config.cpp.

What I meant to say is that Safetys marines will be the first addon that uses them by default, without using triggers.

From the current setup, it's easy to add this to any available soldier out there via trigger.

Share this post


Link to post
Share on other sites

most cases the upper most cross strap of the LBE is used for dragging wounded, leaving one arm free to carry weapon and provied protection. Should be a script around so you can at least have the man being dragged closer to the ground and following the terrain instead of hovering. I suggest you see Sancuary (sp) for help with the animation, seems to be the best guy to help with such things. Most of your mp problems are going to be uncurable. Somebody shows up in game with a ping over 200 will instantly decync even the best of coding like this and you have the bungy effect.

Share this post


Link to post
Share on other sites

get rid of ?!(local server): exit

cos gamelogics are only local to the server. On the client machines therefore, the script will exit straight away.

Share this post


Link to post
Share on other sites

Hovering is my fault, because I placed the proxy of drag vehicle too high.

Ping is not my concern, it's problem of the guy who has it, my task is to make it work.

Anyways, update, giving up on MP aspect, well actually giving up on whole idea (Unless someone can spot the problem and help), altough it works in SP, I don't know why should anyone use it there. I'm gonna research a bit on the latest BAS Littlebirds, there might be solution in there.

Altough I was a great idea, I suppose if it was doable, someone with more experience than me would already do it. confused_o.gif

EDIT: ROBINO, Thanks for your continuing support, I will try that. smile_o.gif

Share this post


Link to post
Share on other sites

From the sounds of situation 1. The server is trying to move the client (player 2) into a vehicle, and it's having no effect. Assuming your vehicle can carry both of you in MP, if you both got in using the normal getin action?

In that case, to me it looks like MoveInVehicle is executed localy on the client? So you would have to move Player2 into the vehicle on his machine. You can do that by having a loop that monitors a public var on the clients side. Then moves the client into a specified vehicle (again using Public Variable).

Share this post


Link to post
Share on other sites

Yes vehicle is enterable for both players.

Mind helping me on how to do that, since obviously I suck in MP part. banghead.gif

EDIT:

ROBINO and UNN (or anyone interested in helping), if you have time or MSN please contact me at (underscore)(at)hotmail(dot)com

Edited by Sniperwolf572

Share this post


Link to post
Share on other sites

Wow, I am medium or something. Two days ago I was describing some problems in OFP to my friends and suddenly I got idea about 'vehicle' where are moved both persons, 'drager' and 'dragged' and then we have two synchronized animations (for me it was the most difficult thing, as I was thinking about dragging dead/injured person on a shoulder).

I live in Nottingham now, maybe you were somewhere close in that time? wink_o.gif

Seriously. I was going to do some alpha version with no animations and show it to Sancturay to make him to help. But now as I am not the first, I really hope that you will make him to help you smile_o.gif

I am far from MP guru, but as I do scripts only for MP (I do not do any missions for SP, only coops), I gladly would like to help you in this MP scripting. I hope it will be open source where anyone can take what he needs and modify code.

Regards, double.

Share this post


Link to post
Share on other sites

Nah I live in Bosnia, whole different time zone. tounge2.gif

Also, I tossed aside the community stealing syndrome and "released" the script on the page 1, so it's already open source. smile_o.gif

And thank you for your support, shuffle trough the script and see if you can find something excess/left out from it, any help is appriciated.

Also rom bobcats comment, I reseached a bit, and I found this picture:

PSYOP_loading_injury.jpg

I was wondering would this be the thing he mentioned, as I understand there is a "handle" near the neck witch is meant for dragging? If so I would be happy to drop the current system because I have trouble positioning both weapons on the back of the guy who is dragging.

EDIT: ROBINO's solution didn't work, same situations. Trying to figure out how to do what UNN said this time.

Share this post


Link to post
Share on other sites

hehe

the main idea behind the draging was actualy to drag wounded team mates and since they theyre usually liyng flat on ground well...

and as you can see on the pic below hehe its made that way

i couldnt really manage to make anyone drag alive persons which gave me pretty weird bugs

but lets see how this turns out smile_o.gif

Share this post


Link to post
Share on other sites
altough it works in SP, I don't know why should anyone use it there.

*Raises hand*

I would like to try it, so if you decide to abandon this project, please release what you did... smile_o.gif

Share this post


Link to post
Share on other sites

Well, current system could also work for dead pesons, currently it doesn't because it checks for 2 crew and drag vehicle ejects dead cargo.

Share this post


Link to post
Share on other sites

I will share my idea. It uses MAPFACT 'revive' script, where medic or other person can 'revive' dead player.

In my version player is not dead but unconscious and anyone (other player) can try to give him a help.

Every player has some first aid skill (in my first mission, SAS operators has 50% skill, means they roll 100 dice, and for results 1-50 they manage to help, for 51 to 100 injured player dies). Medic has 85% for success.

In current version rescued person is very damaged (setdamage .85 if I remember correctly) and needs urgent medevacuation to field hospital (as there is no OFP medic in team - total healing in the field sucks smile_o.gif ).

But if this addon would be succesfull, I would made rescued person still in so bad shape, that he should be dragged to helicopter or car and then transported to hospital. ATM he can go there on his own sad_o.gif

Of course dragged player cannot move, he just see everything from 2 meters up smile_o.gif I mean he sees his body and his rescuers. Exactly like in MAPFACT script.

ATM I have very little time (work :/) but in weekend, if problem will not be solved, I will check it out in details.

Share this post


Link to post
Share on other sites

I guess we have the same idea wink_o.gif , I was planning on making the injury from 0.8 to 0.99 damage immobile one, so he isn't dead yet, but cannot move with an static animation played witch is kind of him faking death, and setting him captive. Also your solution is nice one too. I like it.

Share this post


Link to post
Share on other sites

I have a couple of comments. If you already know then I'm sorry.

First, whoever said the guy and dragee are going too fast for their feet he's right. I'm sure you know this so never mind. confused_o.gif

Second. What is the possibility of the dragee being able to shoot from that position?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×