# X offset and Y offset

Get help using Construct 2

### » Fri Nov 06, 2015 11:49 pm

Hey, so currently I'm trying to make a bejeweld-like game to learn about drag and drop and all that good stuff. The thing is I'm fairly new to construct and my programming knowledge is little to none in terms of "vocabulary" I guess, and searching thourgh the forums I found a guy that shared a .capx file which contained a very simple and basic drag and drop code, but instead of setX and setY (x and y from the jewel) there was something about xoffset and yoffset and tried searching for it but couldn't find anything ... anyaway, I was hoping someone could explain this to me and share some other useful codes and such? Like anything helps, even some website link with the most useful basic concepts of programming or whatever.

EDIT1: Ok this is kinda embarassing, it was an instance variable ... Still, I'd like some explanation on what it is since I spent my time writing this... :p
B
6
Posts: 6
Reputation: 380

### » Sat Nov 07, 2015 12:37 am

An offset is just a position relative to something else. It could be some thing as simple as your left eye is two inches to the left of your right eye. It's use in that capx would depend on what the capx is doing specifically.

Usually to do drag n drop in C2 you just use the dragdrop behavior unless you have a good reason not to.
B
94
S
33
G
128
Posts: 5,488
Reputation: 81,539

### » Sat Nov 07, 2015 2:54 am

R0J0hound wrote:An offset is just a position relative to something else. It could be some thing as simple as your left eye is two inches to the left of your right eye. It's use in that capx would depend on what the capx is doing specifically.

Usually to do drag n drop in C2 you just use the dragdrop behavior unless you have a good reason not to.