generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need help for the fourth time qq

Previous Thread :: Next Thread 
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 11:46 AM
Ok so this only runs if the frame is inside the other frame...

if not(((X_BORDER_OF_OBJECT[1] > CURRENT_GUI[4][WALL].X_BORDER_OF_WALL[1] and X_BORDER_OF_OBJECT[2] > CURRENT_GUI[4][WALL].X_BORDER_OF_WALL[2])or(X_BORDER_OF_OBJECT[1] < CURRENT_GUI[4][WALL].X_BORDER_OF_WALL[1] and X_BORDER_OF_OBJECT[2] < CURRENT_GUI[4][WALL].X_BORDER_OF_WALL[2]))or((Y_BORDER_OF_OBJECT[1] > CURRENT_GUI[4][WALL].Y_BORDER_OF_WALL[1] and Y_BORDER_OF_OBJECT[2] > CURRENT_GUI[4][WALL].Y_BORDER_OF_WALL[2])or(Y_BORDER_OF_OBJECT[1] < CURRENT_GUI[4][WALL].Y_BORDER_OF_WALL[1] and Y_BORDER_OF_OBJECT[2] < CURRENT_GUI[4][WALL].Y_BORDER_OF_WALL[2]))) then

And it's supposed to run if it 'touches' another frame..

Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 11:53 AM
Full script;
http://pastebin.com/HeWWsMYC

Ikr.. I calculated the center for nothing..
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 11:55 AM
Oh ignore
script.Parent.Object2.Position = UDim2.new(X_BORDER_OF_OBJECT[2],script.Parent.Object2.Position.X.Offset,Y_BORDER_OF_OBJECT[1],script.Parent.Object2.Position.Y.Offset)

It was there just for debug
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:01 PM
y u no help qq
Report Abuse
sircfenner is not online. sircfenner
Joined: 29 Aug 2008
Total Posts: 2430
29 Apr 2012 12:03 PM
Because a lot of us find it hard to debug scripts that we haven't written ourselves.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:03 PM
Yeah but it's not the script that is failing.. My logic qq
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:05 PM
It only works if the OBJECT is inside WALL
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:16 PM
I'M GETTING MAD BECAUSE WHENEVER I TRY TO FIX IT, IT ACTS WEIRD.. QQ
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:26 PM
qq
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
29 Apr 2012 12:28 PM
get shorter variables.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:29 PM
No.
It's hard to remember without doublechecking your code what does x stand for..
Report Abuse
LeRMDX1 is not online. LeRMDX1
Joined: 27 Apr 2012
Total Posts: 34
29 Apr 2012 12:37 PM
reported for offsiete links
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:39 PM
haterrzzzzzz
incase eet gots CDed
c852596e2cb8c397aa810c6ba6a5b0a2
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
29 Apr 2012 12:49 PM
"Ok so this only runs if the frame is inside the other frame...
And it's supposed to run if it 'touches' another frame.."

Looking at all the greater and less than signs, that may be your problem. Most likely you need to use the >= and <= instead. If that doesn't work (depending on how your script works) You may have to add a sort of "hitbox" where the if statement holds true if the two are within a certain "border area".
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:51 PM
I've already tried to use <= and >= but it starts acting weird..

For example it results as some a is touching b when

____.......____
|.a.|......|.b.|
-----.......----
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:53 PM
Did you check the full script?
It's supposed to be called like

GUI_LIB.GUI_TOUCH(gui_to_detect_touch,table_of_frames,use_offset)
Report Abuse
Legend26 is not online. Legend26
Joined: 08 Sep 2008
Total Posts: 10586
29 Apr 2012 12:54 PM
Hmm. Your variables could be wrong then. Or the variables_and_if statement. I'm assuming the border variables update every time its moved?
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:55 PM
The border variables updates every time the object is moved..
It doesn't update the borders for other frames.. But that's not the problem because the other frames don't move..
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 12:58 PM
It might be because of misplacing with parentheses
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 01:16 PM
But I've checked that several times and it still doesn't work..
Report Abuse
merlin156 is not online. merlin156
Joined: 12 Aug 2009
Total Posts: 72
29 Apr 2012 01:24 PM
I can't get any sense from the script.(Mikä ei oo sinäänsä uutta :D)
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
29 Apr 2012 01:26 PM
Ok :P (Oot vielläkin tossa finland groupissa hmmm.. toi olis semmonen library jossa ois pseudo event gui touchedille)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image