Question

Discussion in 'iPhysics [old jailbreak version]' started by bugmenot1, Jan 19, 2008.

  1. bugmenot1

    bugmenot1 Banned

    Joined:
    Nov 7, 2007
    Messages:
    140
    Likes Received:
    0
    I'm making a level pack, and I want to know how to create an object that when the circle touches it, it is a game over.

    Like in Moo'n Patrol, if the arrow hits one of the polygons, you have to start over..
  2. Rawd

    Rawd New Member

    Joined:
    Oct 14, 2007
    Messages:
    2,192
    Likes Received:
    4
    Shape definition
    A shape is a dict, with the following tags:

    type
    integer - Required

    Type of the shape, one of the following:

    1 - Circle. Requires the tags x, y and radius.
    2 - Line. Requires the tag points.
    3 - Polygon. Requires the tag points.
    Add one of the following values for special actions:

    128 - The shape is the target! (normally a red box)
    256 - The shape is the ball! (normally a blue circle)
    512 - The shape is non-physical (no collision with physical objects, mainly for statics)
    1024 - The user can drag and create joints with this object (dynamics)
    2048 - The object is a scoreboard. If used alone, the object will act as a non-physical one, which is normally what you want. Requires the tags x, y, numbers and digits.



    So.. to answer your question, add '128' to your integer of your object.
  3. jmccnz

    jmccnz New Member

    Joined:
    Nov 14, 2007
    Messages:
    169
    Likes Received:
    0
    Just for my understanding, how does making the shape a target make it "deadly" to the ball? Would a target not take you to the next level?
  4. Rawd

    Rawd New Member

    Joined:
    Oct 14, 2007
    Messages:
    2,192
    Likes Received:
    4
    Ya, sorry I wasn't thinking clearly....

    Add this to your object...

    <key>on_collision</key>
    <array>
    <dict>
    <key>action</key>
    <string>goto_level</string>
    <key>level</key>
    <integer>4</integer> (Whichever level you want to repeat)
    </dict>
    </array>


    You can read all about the plist file here.....

    http://iphysics.r4m0n.net/index.php?title=IPhysics_Levelpack_Format

    Have fun!
  5. bugmenot1

    bugmenot1 Banned

    Joined:
    Nov 7, 2007
    Messages:
    140
    Likes Received:
    0

Share This Page