Permalink
Browse files

Made an item for the trophies, and placed one on platform peril.

  • Loading branch information...
1 parent e6e50b9 commit a195e806c74ab7a8e4339427005d50c0c87ef43a @rkettering rkettering committed May 2, 2012
Showing with 152 additions and 27 deletions.
  1. +45 −27 data/level/platform-peril.cfg
  2. +107 −0 data/objects/items/trophy.cfg
@@ -5,7 +5,7 @@
"background_offset": [0,0],
"character": [
{
- "_addr": "0x1ee27600",
+ "_addr": "0x1ee87e00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -23,7 +23,7 @@
"y": 94
},
{
- "_addr": "0x1ee27e00",
+ "_addr": "0x1ee88200",
"current_frame": "normal",
"custom": "yes",
"face_right": 0,
@@ -41,7 +41,7 @@
"y": 94
},
{
- "_addr": "0x1ee28400",
+ "_addr": "0x1ee88800",
"current_frame": "normal",
"custom": "yes",
"face_right": 0,
@@ -62,7 +62,7 @@
"y": 128
},
{
- "_addr": "0x1ee29600",
+ "_addr": "0x1ee89c00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -83,7 +83,7 @@
"y": 96
},
{
- "_addr": "0x1ee29c00",
+ "_addr": "0x1ee8a000",
"current_frame": "normal",
"custom": "yes",
"face_right": 0,
@@ -104,7 +104,7 @@
"y": -32
},
{
- "_addr": "0x1ee2a200",
+ "_addr": "0x1ee8a600",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -125,7 +125,7 @@
"y": 448
},
{
- "_addr": "0x1ee2ae00",
+ "_addr": "0x1ee8ac00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -144,7 +144,7 @@
"y": -320
},
{
- "_addr": "0x1ee30600",
+ "_addr": "0x1ee8b200",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -172,7 +172,7 @@
"y": 480
},
{
- "_addr": "0x1ee30c00",
+ "_addr": "0x1ee8b800",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -199,7 +199,7 @@
"y": 288
},
{
- "_addr": "0x1ee31200",
+ "_addr": "0x1ee8be00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -225,7 +225,7 @@
"y": 256
},
{
- "_addr": "0x1ee31800",
+ "_addr": "0x1ee94200",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -251,7 +251,7 @@
"y": 352
},
{
- "_addr": "0x1ee31e00",
+ "_addr": "0x1ee94800",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -276,7 +276,7 @@
"y": -96
},
{
- "_addr": "0x1ee32400",
+ "_addr": "0x1ee94e00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -301,7 +301,7 @@
"y": -160
},
{
- "_addr": "0x1ee32a00",
+ "_addr": "0x1ee95400",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -326,7 +326,7 @@
"y": -96
},
{
- "_addr": "0x1ee33000",
+ "_addr": "0x1ee95a00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -350,7 +350,7 @@
"y": 416
},
{
- "_addr": "0x1ee33600",
+ "_addr": "0x1ee96000",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -374,7 +374,7 @@
"y": 416
},
{
- "_addr": "0x1ee33c00",
+ "_addr": "0x1ee96600",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -398,7 +398,7 @@
"y": 256
},
{
- "_addr": "0x1ee34200",
+ "_addr": "0x1ee96c00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -422,7 +422,7 @@
"y": 416
},
{
- "_addr": "0x1ee34800",
+ "_addr": "0x1ee97200",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -440,7 +440,7 @@
"y": 416
},
{
- "_addr": "0x1ef49600",
+ "_addr": "0x1ee97800",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -453,7 +453,7 @@
"y": -416
},
{
- "_addr": "0x23bc1000",
+ "_addr": "0x1ee97e00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -462,15 +462,16 @@
"type": "teleport_pedestal",
"vars": {
"dest_door": "basement_receiving_teleporter",
- "dest_level": "milgrams-basement-junction.cfg"
+ "dest_level": "milgrams-basement-junction.cfg",
+ "glow": null
},
"velocity_x": 0,
"velocity_y": 0,
"x": 6336,
"y": -416
},
{
- "_addr": "0x23bdee00",
+ "_addr": "0x1ee98400",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -483,7 +484,7 @@
"y": -736
},
{
- "_addr": "0x23bf8200",
+ "_addr": "0x1ee98a00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -496,7 +497,7 @@
"y": -320
},
{
- "_addr": "0x238ac400",
+ "_addr": "0x1ee99000",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -514,7 +515,7 @@
"y": 352
},
{
- "_addr": "0x23849e00",
+ "_addr": "0x1ee99600",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -527,7 +528,7 @@
"y": 352
},
{
- "_addr": "0x1192000",
+ "_addr": "0x1ee99c00",
"current_frame": "normal",
"custom": "yes",
"face_right": 1,
@@ -538,6 +539,23 @@
"velocity_y": 0,
"x": 2368,
"y": 352
+ },
+ {
+ "_addr": "0x2383b200",
+ "current_frame": "normal",
+ "custom": "yes",
+ "face_right": 1,
+ "label": "_3a43f7c3",
+ "time_in_frame": 0,
+ "type": "trophy",
+ "vars": {
+ "kind": "milgramblock",
+ "time_acquired": 0
+ },
+ "velocity_x": 0,
+ "velocity_y": 0,
+ "x": 6078,
+ "y": -463
}
],
"dimensions": [1952,-896,6623,703],
@@ -0,0 +1,107 @@
+{
+id: "trophy",
+on_create: "add_particles('particles')",
+collide_dimensions: ["~item"],
+traction_in_air: 1000,
+properties: {
+ event_name: "'trophy_' + vars.kind + '_acquired'",
+},
+on_start_level: "[ if(level.player.vars.stored_events[event_name] = 1, remove_object(me)),
+ add(variations, [vars.kind]),animation('normal')]",
+on_collide_object_item: "if(collide_with.is_player_body_part and vars.time_acquired = 0,[fire_event('acquired'),set(level.player.control_lock, []),schedule(1,set(level.player.animation, 'item_get_begin')) ])",
+on_end_anim: "animation('normal')",
+respawns: false,
+on_acquired: "[set(vars.time_acquired,cycle),
+ set(alpha,0),
+
+ set(level.zoom, 2),
+ schedule(40, [set(alpha,255),set(midpoint_x,level.player.mid_x-20*level.player.facing),set(midpoint_y,level.player.mid_y-60),set(velocity_y,-30),set(accel_y,00),set(zorder,50)]),
+ schedule(90, fire_event('force_loot_acquire')),
+ set(level.player.vars.triggered_events, level.player.vars.triggered_events + [event_name]),
+ schedule(160, set(level.player.animation, 'item_get_end')),
+ schedule(200, [set(level.player.control_lock, null),set(level.zoom, 1),]),
+ schedule(210, die()),
+ schedule(40,speech_dialog([~You found a golden trophy!~],[~It has no special use, but hey - it's solid gold.\nThat can't be bad!~]))
+
+ ]",
+
+on_force_loot_acquire: "[set(alpha,0),map([0,0,0,0],spawn('coin_sparkle',midpoint_x + 1d40-20,midpoint_y + 1d40-20,0)),sound('coin.ogg')]",
+
+editor_info: {
+ category: "props",
+ var: [
+ {
+ name: "kind",
+ type: "enum",
+ value: "'ant'",
+ enum_values: "ant,kitty,bunny,milgramblock,fumper,bat,fish,squirrel",
+ }],
+},
+
+vars: {
+ time_acquired: 0,
+},
+variations: {
+ ant: "null",
+ kitty: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [32,0,63,31]))]",
+ bunny: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [64,0,95,31]))]",
+ milgramblock: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [96,0,127,31]))]",
+ fumper: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [0,32,31,63]))]",
+ bat: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [32,32,63,63]))]",
+ fish: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [64,32,95,63]))]",
+ squirrel: "[map(filter(doc.animation, value.rect = [0,0,31,31]), 'anim', set(anim.rect, [96,32,127,63]))]",
+},
+
+animation: {
+ id: "normal",
+ image: "props/trophies.png",
+ rect: [0,0,31,31],
+ feet_x:32,
+ feet_y:64,
+ frames: 1,
+ duration: 8,
+ item_area: "all",
+},
+particle_system: {
+ id: "particles",
+ type: "simple",
+ min_y: -10,
+ max_y: 30,
+ min_x: -10,
+ max_x: 30,
+ spawn_rate: 10,
+ time_to_live: 18,
+ animation: [
+ {
+ id: "sparkle",
+ image: "props/items.png",
+ rect: [139,88,149,98],
+ frames: 4,
+ pad: 3,
+ duration: 6,
+ },
+ {
+
+ #
+ #same thing, but skip the first frame
+ id: "sparkle",
+ image: "props/items.png",
+ rect: [153,88,163,98],
+ frames: 3,
+ pad: 3,
+ duration: 4,
+ },
+ {
+
+ #
+ #same thing, but skip the first 2 frames
+ id: "sparkle",
+ image: "props/items.png",
+ rect: [167,88,177,98],
+ frames: 2,
+ pad: 3,
+ duration: 6,
+ },
+ ],
+},
+}

0 comments on commit a195e80

Please sign in to comment.