Jump to content
Sign in to follow this  
INF_MIke64

FIA Offroader augmentation.

Recommended Posts

1024x576.resizedimage

92C3A59D24EFE23D4CBAEF93416072F1F1822706

New Known Issues

Get out event not working In MP (player who mounts weapon can get out of weapon as intended, Others get out as standard and hover over vehicle)

V1.1

-Mortars can now be manned and fired on the move

-Non raised HMG & GMG now supported for Offroader

Download

Share this post


Link to post
Share on other sites

Is it right that i did?

place offroadAUG.sqf in mission folder

put nul = [this] execVM "OffroadAUG.sqf"; at FIA's Isuzu - Dmax int

place static weapons at map such as like I_HMG_01_high_F

preview

nothing happend, no action menu no other things what should i do?

Share this post


Link to post
Share on other sites
Is it right that i did?

place offroadAUG.sqf in mission folder

put nul = [this] execVM "OffroadAUG.sqf"; at FIA's Isuzu - Dmax int

place static weapons at map such as like I_HMG_01_high_F

preview

nothing happend, no action menu no other things what should i do?

Hey I'm not sure how the hell it happened but its not working for me either checked the RTP and I am working on it now.

---------- Post added at 10:49 AM ---------- Previous post was at 10:35 AM ----------

Here Test if this works Download

Share this post


Link to post
Share on other sites

Ooooh this script reminds me of the day when I decided to weld some grenadelauncher drone-guns on my hatchback sport.

:moto: + :coop:

the fun I had ...

Share this post


Link to post
Share on other sites

Ah! Drone Guns I Forgot about them! I may just add them.

---------- Post added at 04:02 PM ---------- Previous post was at 03:12 PM ----------

There you go drones added to the scripts compatibilityDownload

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the update :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Edited by Guest
updated to latest

Share this post


Link to post
Share on other sites

If anyone can help with either of the known issues it would be a great help.

Share this post


Link to post
Share on other sites

Ok, here are a few suggestions on that.

1. On line 22 you check for attachedObjects to see if a weapon is already mounted.

Use an object-variable instead. Otherwise your script won't work when anything else is attached to the vehicle.

2. Instead of adding/removing the action.

Just add one action at the beginning of the script, give it a condition that checks the object-variable to define if the action is visible and then only change the action-text depending on which object is nearby.

3. In your GetOut eventhandler, just use setPos/modelToworld instead of the attachTo/detach combination.

4. Don't add the eventhandler inside the action (or use Bis_fnc_MP). Action-scripts are only executed locally for the client who activated the action. (you could also make functions for attaching/detaching objects and call them via Bis_fnc_MP)

I think if you utilize all that and you could probably rewrite the whole thing cleaner and with much less code.

ps.: If you want it to work on all vehicles without having to add it in their init-lines, you could also run the script on every player and do a "vehicle player != player" check, to detect when the player is inside a vehicle and provide the action only if that is the case.

Edited by Tajin

Share this post


Link to post
Share on other sites
Ok, here are a few suggestions on that.

1. On line 22 you check for attachedObjects to see if a weapon is already mounted.

Use an object-variable instead. Otherwise your script won't work when anything else is attached to the vehicle.

2. Instead of adding/removing the action.

Just add one action at the beginning of the script, give it a condition that checks the object-variable to define if the action is visible and then only change the action-text depending on which object is nearby.

3. In your GetOut eventhandler, just use setPos/modelToworld instead of the attachTo/detach combination.

4. Don't add the eventhandler inside the action (or use Bis_fnc_MP). Action-scripts are only executed locally for the client who activated the action. (you could also make functions for attaching/detaching objects and call them via Bis_fnc_MP)

I think if you utilize all that and you could probably rewrite the whole thing cleaner and with much less code.

ps.: If you want it to work on all vehicles without having to add it in their init-lines, you could also run the script on every player and do a "vehicle player != player" check, to detect when the player is inside a vehicle and provide the action only if that is the case.

Thanks I'll take a look into your suggestions.

---------- Post added at 05:19 PM ---------- Previous post was at 04:17 PM ----------

@Tajin I've hit a problem with your first suggestion, attachedObjects returns a array of objects but "in" checks for classnames and typeOf cannot deal with a array.

I'm Leaving 2 until i can sort the other stuff out.

3 and 4 implemented fine.

Tried implementing number 2 the problem is that the condition does not pass variables that i need for the condition to work properly.

Edited by john681611

Share this post


Link to post
Share on other sites

Regarding 1 and 2:

I'm talking about using something like this when you attach a gun:

_veh setVariable["offAug_attached",(_NO select 0),true];

so as condition (instead of using attachedObjects) you could do this:

if ( !(_veh getVariable["offAug_attached",false]) ) then {

Attaching variables to objects is extremely useful :)

Share this post


Link to post
Share on other sites

Using the code you have provided im getting this as a error

Error in expression <ect 1,0],_MG + _L + _M + _LMG,5];

if((!(_veh getVariable["offAug_attached",fal>

Error position: <!(_veh getVariable["offAug_attached",fal>

Error !: Type Object, expected Bool

Basically It cannot compare a object to a Boolean any ideas.

Share this post


Link to post
Share on other sites

Will you ever expand this so that Zamak vehicles and maybe HEMTT's can use this too?

Share this post


Link to post
Share on other sites

They can be used by adding the script to the vehicles, problem is that the script is configured for the offroader and civi flatbed truck. It was written to bolster the FIA's power in missions like Resistance. I don't see the need for mounting weapons on the trucks of the 3 factions that are already powerful plus a truck is a big weak target.

Share this post


Link to post
Share on other sites

V2.0

-Code rewrite

-Fixed:Actions are not removed correctly in MP (does not effect functionality)

-Fixed:Get out event not working In MP (player who mounts weapon can get out of weapon as intended, Others get out as standard and hover over vehicle)

Thanks @Tajin for your help

Share this post


Link to post
Share on other sites

V3.0 Release on GitHub

 

Updated to work work in MP with a much smoother more efficient system. No need to call execution on each vehicle, just add the class to the config, set the positions and any scripts you want to run as well done!

New Features:
-Hold Actions 
-Animation
-Configuration
-Vanilla vehicle config
-Vehicle to weapon action

Improved
-Getting out of weapon.
-Action limits

Removed
-Most MP bugs (hopefully)

-More stuff I can't remember

Share this post


Link to post
Share on other sites

Nice work!

 

Would it be possible to make an armored gun version  :ph34r:

 

ed9a66fe856d3dffcef688170053a461.jpg

 

photo_of_boy_on_the_back_of_a_machine_gu

 

 

I know you dont have much to work with within a3 objects. Havent really seen any apex stuff :/ Steel plates? Or possibly make an 'addon' version and use some of the a2 source armor plates? ;)

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  

×