-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling of initial FOB Box, FOB placement #411
Conversation
|
||
params ["_box", "_player"]; | ||
|
||
private _canBuild = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess this false
isn't needed.
Just directly the bool condition, which will return true or false.
Maybe even no _canbuild
variable at all and just the expression as return value.
*/ | ||
params ["_position"]; | ||
|
||
private _index = count KPLIB_sectors_fobs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be an issue later.
Imagine you've 5 FOBs -> index is 5, so it creates KPLIB_fob_5. This is fine so far and now an index would be 6 due to the count.
Now the player loose FOB 2 and creates a new one. Count returns 5 and it would be another KPLIB_fob_5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for marker name we could do "KPLIB_fob_" + mapGridPosition _position
and after count of FOBs changes I will just loop on every of them and reassign Alphabet names?
Do you think is it even worth to store markers here? I wanted to do it for unification as capturable sectors are stored as markers, FOB is kind of sector too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're right concerning just store the positions for the FOBs. This also eliminates the need to have the getMarkerPosition conversion.
I've decided to keep markers instead of positions for consistency. Markers use Function checking if FOB can be build was improved (It does not check if another fob is near but this should be added when we will add actions to fobs as I want to experiment with few different approaches to this problem). Requesting second review from @Wyqer |
Description:
Handling of initial FOB box and functionality of FOB creation
Content:
Tested on:
Local MP ACEDedicated MP ACE