SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 10:43 AM |
Funneh error:
"16:41:11 - magnitude is not a valid member, did you forget to capitalize the first letter? 16:41:11 - Script "Players.Player.PlayerGui.ScreenGui.ImageLabel.Script", Line 3 - global IsCollidingObject 16:41:11 - Script "Players.Player.PlayerGui.ScreenGui.ImageLabel.Script", Line 12 16:41:11 - stack end"
"16:41:11 - magnitude is not a valid member, did you forget to capitalize the first letter?"
"did you forget to capitalize the first letter?"
lol
This is good though, it's much better than just "magnitude is not a valid member".
Another great thing Roblox has done to help people learn to script. |
|
|
| Report Abuse |
|
|
|
| 23 May 2012 10:44 AM |
And then when you DO capitalize the first letter, you get "Magnitude is not a valid member".
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
mustyoshi
|
  |
 |
| Joined: 27 Dec 2007 |
| Total Posts: 41651 |
|
|
| 23 May 2012 10:44 AM |
I like how the error tells you exactly how to fix it... WHY DIDN'T IT FIX ITSELF?
~Monica |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 10:45 AM |
But.. Isn't that just warning.. not error?
derpppppp |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 10:46 AM |
| oh it said stack end.. never errored for meh |
|
|
| Report Abuse |
|
|
|
| 23 May 2012 10:48 AM |
I get exactly that when using magnitude on GUI objects. 3D objects such as parts work fine.
~ My RPG is in BETA: http://www.roblox.com/--place?id=80741686 ~ |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 10:50 AM |
I used .Magnitude incorrectly...
With GUIs.
I need to do it the hard way instead.
I'm trying to detect GUI object collision.
I can't visualize things though... -________-
But yeah, if it suggests doing that, why doesn't Lua auto-correct itself? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 10:50 AM |
>No, just look at the rest of the output.
You laik latetoasted..
I noticed it just after I replied.. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 11:05 AM |
yey
i haz working gui object collision naow.
But, when you drag a GUI, it's Position offset doesn't change until you let go of the mouse.
DARNEEET!
bah hum0g |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 11:08 AM |
-700 post-
imma make it more accurate
By the way, I'm making a sorta Crazy-Taxi type GUI game. You're in a car, and you drive, and if you smash into a zombie or something you get game over. Points are the seconds you're alive. |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 11:12 AM |
you made your gui collision out of vector magnitudes?
qq |
|
|
| Report Abuse |
|
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 11:15 AM |
'Tis my collision detection so far
function IsCollidingObject(o) if o.Position.Y.Offset - p.Position.Y.Offset < 5 and o.Position.Y.Offset - p.Position.Y.Offset < -5 then return true end return false end
o = any object p = parent object
yeh i noe that the -5 and 5 thing is not accurate
imma try to change dat
sumhow
"lrn 2 basic math" cant de math teacher ony teach me triangle st00f and 1+1 not 2 1+1 = windoe |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 11:15 AM |
oh and i noe its only Y
when y is accurate i copy past and change eet to z
k? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 11:23 AM |
| Why you don't include all the sizes huh? |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 11:33 AM |
That's what I mean about making it accurate.
But I tried it with the sizes and it ended up detecting collision almost everywhere. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 12:16 PM |
K, I'll use Absolute stuff.
But the function arguments are not bool value.
o = gui
it's kinda like
while wait(0) do for i = blah blah c = child if ObjectColliding(c) then blah blah end end |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 23 May 2012 12:17 PM |
also, you don't need to return false at the end
if function doesnt return anything it handles it as false |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 12:18 PM |
Yeah, thought so.
Just makin' sure. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 23 May 2012 12:20 PM |
"if o.Position.Y.Offset - p.Position.Y.Offset < (p.Size.Y.Offset/2) and o.Position.Y.Offset - p.Position.Y.Offset < -(p.Size.Y.Offset/2) then"
Uhm...this phails.
It detects collision even if the 2 objects are really far away from each over, can someone correct the line? |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|