PDA

View Full Version : Help with BIS_fnc_wpWinchLoad



daikan
Feb 26 2012, 22:15
I made a very simple mission to test the scripted version of setting a WinchLoad waypoint following the Wiki (http://community.bistudio.com/wiki/BIS_fnc_wpWinchLoad).

This is what I put into the init field of my chopper:


nul = [this, victim, 0, 50, 1, nil, {hint "Rescuer died!"}, {hint "Dude saved"}] spawn BIS_fnc_wpWinchLoad;

Everything works as expected except for one thing: The loadCode part (e.g. {hint "Dude saved"}) is executed as soon as I select the "Deploy rope" action whereas the Wiki says this should only execute when a person is loaded into the helicopter.

Am I missing something here?

My goal is to use the loadCode in order to move the victim and rescuer back into cargo positions. If this can be done otherwise/easier I'm all ears ;)

Any input is appreciated.

kylania
Feb 27 2012, 00:28
Well, the Biki page for that function (http://community.bistudio.com/wiki/BIS_fnc_wpWinchLoad) is pretty confusing. The example gives 8 arguments while the details only show 5... I'd have to open it in game to see how it really works, but I'm guessing it's because you have 'nil' as your person-to-be-rescued so since there's no value for that it's assuming you did it just fine.

Moricky
Feb 27 2012, 07:38
Well, the Biki page for that function (http://community.bistudio.com/wiki/BIS_fnc_wpWinchLoad) is pretty confusing. The example gives 8 arguments while the details only show 5...
Because it's custom waypoint function, as stated in description. First 3 arguments (common for all custom waypoints) are described on special page (http://community.bistudio.com/wiki/Custom_Waypoints#Function) and you can access it by clicking the link in syntax section. I hoped it's clear enough, but apparently not. I'll try to make it even more obvious.


As for loadInit param, it was wrongly described, I fixed it (http://community.bistudio.com/wiki?title=BIS_fnc_wpWinchLoad&diff=68018&oldid=65178). Thanks for finding it ;)

daikan
Feb 27 2012, 08:09
Okay, that makes more sense now ;)

Although in that case I wonder how to go about moving the rescuer and victim back into the cargo once they have been winched up? And also: How can the pilot be notified once the rescuer gets hold of the victim?


[...] I'm guessing it's because you have 'nil' as your person-to-be-rescued so since there's no value for that it's assuming you did it just fine.
"nil" is passed so the default is taken for the person going down on the rope (2nd crew member).

daikan
Mar 26 2012, 18:43
Giving this a bump to see if anyone can give some input regarding my follow-up question:


(...) I wonder how to go about moving the rescuer and victim back into the cargo once they have been winched up? And also: How can the pilot be notified once the rescuer gets hold of the victim?

JonieTurnock
May 8 2012, 01:35
Ye same here, some of these commands just are not working for me, probs im doing it wrong. Trying to Fast rope a team but cant seem to get these custom waypoints right. Also is flyinheight still in use because it doesnt seem to make a difference to the hover height of the chopper?