PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

[Question] Remote to control program flow problem

duncanwebb opened this issue ยท 6 comments

commented

For feature requests, just erase this template and clearly describe the feature you'd like to see

Minecraft Version

1.12.2

Forge Version

forge-1.12.2-14.23.5.2768-universal

Mod Version

pneumaticcraft-repressurized-1.12.2-0.10.3-337

Describe your problem, including steps to reproduce it

image

I've copied the program from the book to use the remote to control an universal sensor and wanted to use the same program to control a drone.

In the above screen shot you can see that the condition looks strange.

My question is how can a drone be controlled with a check box on a remote? Is it possible to see the value of variables?

Many thanks

commented

Could you pastebin your program so I can load it up and examine it?

commented

No problem, here you are.
drone program
https://pastebin.com/aRSZZtqd
remote program
https://pastebin.com/xhjrtL57

commented

OK, I think I see what you're attempting here.

The main thing to remember is that remotes can only manipulate global variables, so in your drone program, you should use #signal1 rather than signal1. signal1 would be a local variable to the drone in question.

Also, since the remote only affects the X coordinate of a variable, it's not necessary to include Y & Z in the condition puzzle piece (although it shouldn't do any harm).

As far as viewing variable values, there are a few options:

  • Display them on the remote via a label (which you do in your example)
  • A Sign Edit puzzle piece can use variables with the same ${var} or ${#var} syntax, so you can write variable values to a sign or aphorism tile
  • A Drone Rename puzzle piece can write the variable name into the drone's name with the same syntax

Does that answer everything?

commented

Many thanks, It was the global/local variables that I didn't realize that there were local and global variables.

I'm guessing that a checkbox only effects X and buttons can set any value.

I like the edit sign component most as it provides a confirmation independently from the remote and can display multiple variables. This is explained in the coordinate operator widget but I find reading on screen hard compared to reading a page of A4.

Thanks again for you help.

commented

Yes, the checkbox widget only affects the X value, and buttons can set any or all of X,Y,Z depending on what you configure in the Remote GUI editor.

Any other remote questions? Or is this good to close now?

commented

Sorry I should have done that.