Who knows how to spell OpenComputers

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Pyure

Not Totally Useless
Aug 14, 2013
8,334
7,191
383
Waterloo, Ontario
I'm hoping to garner some very entry-level answers to entry-level questions on OpenComputers.

About me:
  • I've used ComputerCraft in the past to do simple programs.
  • I am a professional developer (C#, Go for the most part these days) and understand programming principals
  • I dislike learning from manuals
About my knowledge of OC:
  • Virtually none
  • I've been using http://ocdoc.cil.li/ as a resource so steer me elsewhere if this isn't the best site.

Question 1: What is the OC equivalent to CC's os.pullEvent("redstone")?

I see I can cheat and do component.redstone.getInput({side}) and then os.sleep for a while, but waiting for a queued event feels like the more appropriate method.
 

RenzosNips

New Member
Jul 29, 2019
199
-1
0
I know there's a way, it's just been so long since I've actively used OC. (Or... a few weeks in general for Minecraft) I apologize for not being able to help.

I'd recommend the OC forums, or whatever place Sangar frequents.
 

Starfang42

New Member
Jul 29, 2019
189
0
0
Been a while since I've used OC for anything complex, but I'll answer questions as I can.

For your first question, you're probably looknig for the event API:
http://ocdoc.cil.li/api:event

Basically, either use event.pull to grab the event directly, or event.listen if you want to register a listener and a callback function to automatically be called.

http://ocdoc.cil.li/component:signals lists several signals, and it looks like the one you're looking for in this case is named redstone_changed.
 

Pyure

Not Totally Useless
Aug 14, 2013
8,334
7,191
383
Waterloo, Ontario
Been a while since I've used OC for anything complex, but I'll answer questions as I can.

For your first question, you're probably looknig for the event API:
http://ocdoc.cil.li/api:event

Basically, either use event.pull to grab the event directly, or event.listen if you want to register a listener and a callback function to automatically be called.

http://ocdoc.cil.li/component:signals lists several signals, and it looks like the one you're looking for in this case is named redstone_changed.
Thanks, you may be right. I've been through both these pages previously but I think the name of the second one confused me (the term "signals" didn't mean anything to me)