Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-06-29 13:19:01

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

EEPhysics

 users[m.GetInt(0)].Physics.AddBlockTouchEvent(9, delegate (PlayerEventArgs e)
 {
          con.Send("b", 0, x, y, 4);
 });

For the code above it deletes 3 blocks...
1 above you.
1 to the left
1 to the right..

Is it possible i can change it to only delete the block infront of you?

I know you can do it without eephysics.. but i want to use eephysics for the sake of saving time.. bc im lazy.


FluxBB bbcode test

Offline

#2 2017-06-29 15:05:25

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,830

Re: EEPhysics

EEPhysics seems a bit overkill if you're making a digbot (it looks like you are), but with that code if you're touching three grey basic blocks then it'll erase those three blocks. For there to be an "in front of you" you would need to store the last direction that the player moved in, using "m"[7] and "m"[8], and take that as the direction they're facing. Then you check if any of the blocks they're currently touching is "in front" of them, and erase only that one.

But a generic digbot done in this way would be boring to play, because you'd only have to hold down a key to dig a line of blocks, instead of tapping. Adding other features like portal worms or other hazards would be necessary to make it a fun BAL.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#3 2017-06-29 15:43:25

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

Re: EEPhysics

Thank you & how do i get edit with bot??

con.Send("access", 1234);

doesn't work.


FluxBB bbcode test

Offline

#4 2017-06-29 15:48:43

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: EEPhysics

italkalotfromee wrote:

Thank you & how do i get edit with bot??

con.Send("access", 1234);

doesn't work.

Try this:

con.Send("access", "1234");

I think it needs to be a string

Offline

#5 2017-06-29 15:50:24

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

Re: EEPhysics

con.Send("access", "1234");

I think it needs to be a string

That doesn't work either. //forums.everybodyedits.com/img/smilies/neutral


FluxBB bbcode test

Offline

#6 2017-06-29 15:53:15

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: EEPhysics

italkalotfromee wrote:
con.Send("access", "1234");

I think it needs to be a string

That doesn't work either. //forums.everybodyedits.com/img/smilies/neutral

Is the code actually 1234, because im pretty sure it worked for me before...

Offline

#7 2017-06-29 16:23:41

italkalotfromee
Member
Joined: 2015-05-08
Posts: 117

Re: EEPhysics

Yes, I'm testing it in my world. //forums.everybodyedits.com/img/smilies/cool


FluxBB bbcode test

Offline

#8 2017-06-29 16:25:02

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: EEPhysics

italkalotfromee wrote:

Yes, I'm testing it in my world. //forums.everybodyedits.com/img/smilies/cool

Can you give the rest of your code then?
If my last suggestion doesnt work, and the code is definately 1234, then I'd guess the problem is somewhere else

Offline

#9 2017-06-29 18:07:30

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: EEPhysics

I think you are trying to do something like a digbot. I made an example how to make a digbot all code is added you just need to understand how it works.
https://pastebin.com/9EqUSzdR

Offline

#10 2017-06-29 18:24:14

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 6,206

Re: EEPhysics

PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "[email protected]", "01234567890", null,

"[email protected]", "01234567890"

nice

Offline

#11 2017-06-29 19:43:33

capasha
Member
Joined: 2015-02-21
Posts: 4,066

Re: EEPhysics

Gosha wrote:

PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "[email protected]", "01234567890", null,

"[email protected]", "01234567890"

nice

Don't steal my awesome passwords.

Offline

Wooted by:

#12 2017-06-29 20:02:36

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: EEPhysics

To actually answer the answer (in case EEPhysics is required for other stuff) You can just request the current position of the player and calculate the delta x and y of the touched block position. If the delta x isn't 0, you can remove the block (or whatever).

In case you don't understand what I mean with delta, it's very simple: Delta is basically the difference, if player is located at ([x,y]) [20,20] and a touched block is at [19,20], then the delta x = -1 and delta y = 0.

P.S. Maybe use a bit more descriptive title next time //forums.everybodyedits.com/img/smilies/tongue

Offline

den31071498762956665933

Board footer

Powered by FluxBB

[ Started around 1713565573.6221 - Generated in 0.046 seconds, 10 queries executed - Memory usage: 1.55 MiB (Peak: 1.72 MiB) ]