Jump to content

Dayz Epoch - Build with Vectors (WIP-ish)


striker

Recommended Posts

 

Anyway, I seen that your script does not include the Y axis. Does that mean you cannot tilt the object forward and backwards?

Also, what degree can your users tilt the object at?

 

Not at the moment no, on original implementation I was getting strange rotation results so I just disabled that and I haven't looked into that yet, right now you can either use Alt+[Q/E] to rotate 45 degrees or Ctrl+[Q/E] for 15

 

(or Alt+[F] to toggle terrain aligning :P)

Link to comment
Share on other sites

Nice, Nice

 

I just use the scroll menu as that would be easier for the user to use...

 

Who am I kiding, Honestly I have not looked into using the keys. Although I can look at how epoch did it themselves.

 

My question is, how do I use other keys like "B" if that does nothing?

Link to comment
Share on other sites

Nice, Nice

 

I just use the scroll menu as that would be easier for the user to use...

 

Who am I kiding, Honestly I have not looked into using the keys. Although I can look at how epoch did it themselves.

 

My question is, how do I use other keys like "B" if that does nothing?

You could make a pitchvariable01=false; in your variables.sqf. Then you can use dayz_spaceinterrupt to make a key press set that variable to true. At the top of your player_build always set them to false. Inside your crafting loop you check for that variable being true, (like they do for q/e alt pg up, etc and have that do something then change the value back to false. Just look into dayz_spaceinterrupt and how it defines and uses handled key presses. My alchemical crafting mod uses 1 and 3 to spin objects in 22.5 degree increments but you can set any number of keys to do anything. Just remember, the more keys you use, the more variables you will be setting/resetting so I wouldn't use keys that players already use a lot just to keep resource usage as low as possible.

 

You can use 

https://community.bistudio.com/wiki/DIK_KeyCodes

as a reference for what code to put in there.

Link to comment
Share on other sites

My question is, how do I use other keys like "B" if that does nothing?

 

Take a look inside dayz_spaceInterrupt.sqf and uncomment this line //diag_log format["Keypress: %1", _this];

 

Then go in-game, hit the B key and look in your Arma2OA.rpt file, the output will be something like Keypress: 0x10 (this is the code for Q)

 

that will be the code for B, now you can just copy the existing examples for Q, E etc and make a check for B, this, ontop of what hogscraper mentioned with the variables and you'll be set

Link to comment
Share on other sites

This is how I added F key, simple as that.

https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf#L201

 

After that you could run if statement inside while loop that checks if bool is true, once true, run statement once and immediately set to false.

https://github.com/vbawol/DayZ-Epoch/blob/master/SQF/dayz_code/actions/player_build.sqf#L223

Link to comment
Share on other sites

https://github.com/SJossy/Epoch-Snap-Build-with-Vectors

 

Here's an early release for those smart people if they want to test it ahead of schedule, I haven't yet done any testing myself because it's 1am at the time the instructions were semi finished, so use at your own risk, once I have gone through and checked out the instructions with a vanilla install I will make a proper forum release post and update the git. I haven't had a chance to actually test this without Plot For Life enabled, so if someone could do that it would be a huge help!

 

I'll say it again, DON'T try this unless you know what you are doing, once I know it works without issue I will post a new topic and officially announce it.

 

Also if anyone would like to help test and contribute I'd be more than happy to accept that and will award credit where due.

Link to comment
Share on other sites

Absolutely beautiful and well done code, also thanks for the credit. This will definitely change the way epoch is played when finished. 

I've noticed the pull request on epoch github and that you want to change the player build, I've personally no idea how devs intended these changes to affect the game so made player_build2 file instead for now, just wanted to let you know. However I've though about it for quite a while now and want to try to replace default system with something that doesn't force addons to replace the function. 

 

Basically there are few mods out there that should be part of epoch, imo and made compatible together (also should be a toggle-able option for admins). So I am still thinking of the best way to achieve this.

Link to comment
Share on other sites

Absolutely beautiful and well done code, also thanks for the credit. This will definitely change the way epoch is played when finished. 

I've noticed the pull request on epoch github and that you want to change the player build, I've personally no idea how devs intended these changes to affect the game so made player_build2 file instead for now, just wanted to let you know. However I've though about it for quite a while now and want to try to replace default system with something that doesn't force addons to replace the function. 

 

Basically there are few mods out there that should be part of epoch, imo and made compatible together (also should be a toggle-able option for admins). So I am still thinking of the best way to achieve this.

 

 

Hey raymix,

 

Just wondering who the message was directed towards? I canceled my pull request due to the fact that I seen you added your snap building and there is no sense in having to pick between snap build or vector rotation.

Link to comment
Share on other sites

https://github.com/SJossy/Epoch-Snap-Build-with-Vectors

 

Here's an early release for those smart people if they want to test it ahead of schedule, I haven't yet done any testing myself because it's 1am at the time the instructions were semi finished, so use at your own risk, once I have gone through and checked out the instructions with a vanilla install I will make a proper forum release post and update the git. I haven't had a chance to actually test this without Plot For Life enabled, so if someone could do that it would be a huge help!

 

I'll say it again, DON'T try this unless you know what you are doing, once I know it works without issue I will post a new topic and officially announce it.

 

Also if anyone would like to help test and contribute I'd be more than happy to accept that and will award credit where due.

 

I would highly suggest people do not add these to their files in a production server. If you want to play around with them in a dev server, all the power to you.  There are still 5 or 6 files that need to be changed for them to work at maximum efficiency. HOWEVER, they will work just fine if you add them into your server. It is just to save you the "ADMIN" headache when someone upgrades a wall.

Link to comment
Share on other sites

Hey raymix,

 

Just wondering who the message was directed towards? I canceled my pull request due to the fact that I seen you added your snap building and there is no sense in having to pick between snap build or vector rotation.

I am a bit confused, are you guys working together on the same project?

Link to comment
Share on other sites

I would highly suggest people do not add these to their files in a production server. If you want to play around with them in a dev server, all the power to you.  There are still 5 or 6 files that need to be changed for them to work at maximum efficiency. HOWEVER, they will work just fine if you add them into your server. It is just to save you the "ADMIN" headache when someone upgrades a wall.

Oh yes, thank you for reminding me, was a little tired when I went to bed last night  :P Will get onto that now

 

Hey Jossy,

 

Did you ever get the Y axis to work yet or no? Just curious.

Yeah I did, that's what took so long to get the release up

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
  • Discord

×
×
  • Create New...