Jump to content
Sign in to follow this  
bospor

Putting fish into a boat

Recommended Posts

I am trying to AttachTo fish to the inside of the boat. Because there is no fish in Animals in editor, I can't figure it out. Was thinking maybe attaching a rabbit, but replacing the rabbit class with tuna. But I can't figure out how to replace one animal with another in init field. Please help. Or if you have other suggestions, please share that as well. Thank you guys.

Share this post


Link to post
Share on other sites

I really don't think this is important unless youre making a fishing mission...

anyway give me ~5 minutes if I remember I'll post the code you need, ok?

---------- Post added at 18:10 ---------- Previous post was at 17:46 ----------

Put down an invisible helipad (empty > objects (signs) > helipad (invisible) )

then put this code in the init:

fish = "Salema_F" createVehicle position this; deleteVehicle this; wokka setDir 270;

after that, you can adjust the height (if that doesnt work then try attachTo)

Share this post


Link to post
Share on other sites

Thanks for your answer. Is there a way to also give this fish a name in the script?

Share this post


Link to post
Share on other sites
Thanks for your answer. Is there a way to also give this fish a name in the script?

What do you mean by name?

Share this post


Link to post
Share on other sites

I figured the name. I need all this to attach fish to a boat, simulating fishing for Altis life. I just give a name to an object that I am turning to a fish via createVehicle command. Then I use NAME attachTo command to put the fish in the boat. Unfortunately I can't figure out how to attach multiple fish to the boat. I get another object and name it FISH2. Then with a trigger do :

FISH2 attachTo [ship,[0.5,1.2,-1]];

But for some reason it works for the first fish, but doesn't for the other four tunas that I am trying to put in the boat. Can anyone help?

I wanted to attach an image with a fish in the boat, but can't figure out how on this forum. No way to attach an image from my computer here? Has to be URL?

Share this post


Link to post
Share on other sites

You could just do a for loop structure in a script:

//name this script addFishBoat.sqf
//and place the following in the boat's init field: null = [#, this] execVM "addFishBoat.sqf"
//obviously # being the number of fish you would want


_numFish = (_this select 0);
_ship = (_this select 1);

for "_i" from 0 to (_numFish) step 1 do {

_fish = "Salema_F" createVehicle position _ship;
_fish attachTo [_ship,[0.5,1.2,-1]];
_fish setDir (random 359);

};

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  

×