Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Fortify Feature Request: Allow custom conditions for "canFortify" #166

Open
BojanOro opened this issue Jan 25, 2019 · 10 comments
Open

Fortify Feature Request: Allow custom conditions for "canFortify" #166

BojanOro opened this issue Jan 25, 2019 · 10 comments

Comments

@BojanOro
Copy link

It would be nice to accept a code block so that people can specify additional requirements to be able to fortify; things like presence to a supply vehicle, being in a certain squad, etc.

@Cuel
Copy link
Contributor

Cuel commented Jan 25, 2019

@BojanOro
Copy link
Author

While that will accomplish the end goal of not allowing a player to place until conditions are met, it is not intuitive for the self interaction option to show up if the player cannot use it.

The deploy handlers execute while the user is placing an object, my suggestion would execute while the player is opening their self interaction. This way if you see the fortify option you know you can use it, and if you cannot use it you will not see the option.

@PabstMirror
Copy link
Contributor

You can restrict to a only certian locations

acex_fortify_locations pushBack X
where X is anything that inArea would accept - https://community.bistudio.com/wiki/inArea

[myCar, 50, 50, 0, false] would be 50 meters within your car

@BojanOro
Copy link
Author

Yes, but things like checking if a player is slotted in as a member of the logistics unit, or if a team has captured a certain objective, or any other complex set of conditions would be nice to have as well.

@PabstMirror
Copy link
Contributor

can set
acex_fortify_fortifyAllowed = false/true

@BojanOro
Copy link
Author

BojanOro commented Jan 25, 2019

This would enable/disable for the entire team, wouldnt it? I'm thinking of something that can be set for each player.

Edit:
Let me be more verbose. Lets say I'd like to implement the following conditions:

  • Cannot fortify in the base (on a runway, etc)
  • Player must be slotted in as a logistics squad
  • Player must have one other person with him in order to build
  • Player must not have a weapon on them in order to build

Some of those restrictions don't really make sense (namely the last two), but I include them to highlight the wide array of restrictions you may want to implement.

All of these can be done with the event handler, yes, but hiding the ACE interaction option would be an even better solution.

@Cuel
Copy link
Contributor

Cuel commented Jan 26, 2019

The global variable will be set initially for the entire team but can then be toggled on/off for each client (e.g in initPlayerLocal.sqf, where you can which squad)

The rest of the conditions can be covered with deploy handlers or the acex_fortify_onDeployStart event.
Optionally you can hide the whole menu when player picks up a weapon with CBA player events https://github.com/CBATeam/CBA_A3/wiki/Player-Events

@stale
Copy link

stale bot commented Apr 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Apr 26, 2019
@stale
Copy link

stale bot commented May 3, 2019

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.

@stale stale bot closed this as completed May 3, 2019
@Drofseh
Copy link

Drofseh commented May 3, 2019

I'd still like to see this.

@PabstMirror PabstMirror reopened this May 3, 2019
@stale stale bot removed the inactive label May 3, 2019
@jonpas jonpas added this to the Backlog milestone Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants