Jump to content
  • 0

Building on Roads


Incar

Question

SOLVED

 

Trying to make it so building on roads is only allowed for Hedgehogs, but in trying to do so it makes it so anything can be built. Can anyone explain what I'm doing wrong?

 

This is done in player_build.sqf, placed in mission and compiles edited to load.

 

Added

"_isHedgehog"

to Private

 

Added

_is_isHedgehog = (_classname == "Hedgehog_DZ");

and changed DZE_BuildOnRoads to

    if (!DZE_BuildOnRoads) then {
        if (isOnRoad _position) then {
            if (!_isHedgehog) then {_cancel = true; _reason = "Cannot build on a road."; };
        };
    };

Edit: And the moment I post that, I see my issue, lol. Time to fix the double _is. Hopefully that's the only issue.

Edit 2: Yup, that was the issue, sorry for the wasted post guys.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

This is a post that I like for the following reasons: 

- You post a problem
- You provide examples
- You noticed yourself after posting what was the likely culprit (a perspective change is sometimes all someone needs)
- You Edited post to indicate you thought you had found the reason
- You Edited post again to confirm that it was in fact the case. 

Very few posts are a waste of posts if they follow your example above... Thanks for keeping us in the loop.  :) 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...