I need someone to write me a little code please

  • 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

Ministringham

New Member
Jul 29, 2019
5
0
0
I am new to computercraft and i am curios if I can use the advanced wireless pocket computer to make it so if I fall below y level 0 teleport me to my spawn if any one could tell me how to do this that would be great, I was thinking it sending off a redstone signal to a command block but I also do not know how to write the code for that and I dont want to cheat in a commandblock but if I really really have to, then I will so please let me have some feedback thanks for reading!
 

Not_Steve

Over-Achiever
Oct 11, 2013
1,482
3,264
293
*draws pentagram*
*throws in bucket o' life*
*death Satan McDonald's*
*throws in steak*
@Padfoote
What's the running rate for code?
 

Padfoote

Brick Thrower
Forum Moderator
Dec 11, 2013
5,140
5,898
563
*draws pentagram*
*throws in bucket o' life*
*death Satan McDonald's*
*throws in steak*
@Padfoote
What's the running rate for code?

Ask trajing, he knows CC far better than I do. The most I can do with the mod is make the blocks.
 

zemerick

New Member
Jul 29, 2019
667
0
1
I'm far from an expert in ComputerCraft, but I think the real stumbling block is the "if I fall below y level 0" part. I don't think there is anything that simply detects player location, even with OpenCCSensors. The best I can think of is making a GPS system, which needs to cover the area you are at, then having the pocket computer constantly polling the GPS location. ( I'm not even sure how the pocket computer works with that. I haven't gotten around to CC on current versions. )

The redstone signal to a command block would actually be very easy.

A workaround might be to have some sort of input from the player. For example, if you fall, pull out your pocket computer and turn it on. Then, simply have the teleport script named startup. As soon as you start the pocket computer, it sends the signal, and you get teleported. However, this has the obvious downside of requiring you to be fast enough to react to the situation.

If you have a keyboard with macros, you could build one that will teleport you to safety.
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
I could do this easily, All I need is a way to tell when you fall. which unfortunately w/o GPS (it is kinda a pain and not perfect). I would need input from you the player when you fall
 

RedBoss

New Member
Jul 29, 2019
3,300
0
0
How do you need a macro to keep your Pocket Computer on 1?

My question is why are you falling through 0 so often to need this?
The only time I've fallen below y0, my ichorium pickaxe transported me to the Thaumic Tinkerer mining dimension
 

Ministringham

New Member
Jul 29, 2019
5
0
0
How do you need a macro to keep your Pocket Computer on 1?

My question is why are you falling through 0 so often to need this?
I need this because I used mystcraft to live in a void age and I have power armor so sometimes when I get on my keybindings go away so when I go to work over the void I press G and nothing happends so I end up walking of the clif and dieng also I have gravestones so I can not go all the way down to break it when I die and last keep inventory doesn't work
 

Kirameki

New Member
Jul 29, 2019
310
0
0
I need this because I used mystcraft to live in a void age and I have power armor so sometimes when I get on my keybindings go away so when I go to work over the void I press G and nothing happends so I end up walking of the clif and dieng also I have gravestones so I can not go all the way down to break it when I die and last keep inventory doesn't work
Why not just...add fences/railing/walls...? Or engaging your jetpack *before* going over the edge to ensure it works?