Jump to content

SuperM

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by SuperM

  1. I was checking and I would like to do it with createColPolygon() I think it's the thing I was looking for since I can do weird shapes with it, do you know if is there any script to help me getting the cords to createColPolygon()
  2. Hello, I have the following code: local cuboidarea1 = createColCuboid(1268.4200439453, -838.69525146484, 75.494804382324, 26.5, 18.3, 23.7) local cuboidarea2 = createColCuboid(1203.875, -839.14135742188, 75.190124511719, 48.2, 18.6, 24.2) local cuboidarea3 = createColCuboid(1203.3291015625, -820.44226074219, 78.420753479004, 35.7, 20.2, 20.8) local cuboidarea4 = createColCuboid(1239.1188964844, -820.3447265625, 75.279731750488, 69.9, 53.100000000001, 23.9) function ColShapeHit ( thePlayer, matchingDimension ) local detection = isElementWithinColShape ( thePlayer, cuboidarea1, cuboidarea2, cuboidarea3, cuboidarea4) detection = detection and getElementDimension( thePlayer ) == getElementDimension( cuboidarea1 ) or getElementDimension( cuboidarea2 ) or getElementDimension( cuboidarea3 ) or getElementDimension( cuboidarea4 ) if detection then outputChatBox ( getPlayerName(thePlayer).." is inside the col shape" ) end end addEventHandler ( "onColShapeHit", root, ColShapeHit ) When one player get's inside of one of the 4 col shapes it sends one message to the chat "Player is inside the col shape" each time he get's inside of one col shape. Is there any way to make it show the message only one time? I mean for example the col shapes are like the following image: When player get's inside COL 1 shots the message on the chat, if he walks for example in this direction: He starts outside of COL 1 and stops inside of COL 4, it will show the message 3 times, one for COL 1 another for COL 2 and another for COL 4, is there any way to only show the message 1 time? if he is already inside the col shape 1, 2, 3 or 4, don't show the message. Or if is there any way to make "custom" shapes to make one format like the example images, for example, would probably be easy, instead of creating many col shapes. Thanks in advance for reading the topic and trying to understand what I need. GN everyone.
×
×
  • Create New...