This repository was archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathobj_flagpole.object.gmx
More file actions
160 lines (149 loc) · 4.62 KB
/
Copy pathobj_flagpole.object.gmx
File metadata and controls
160 lines (149 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_flagpole</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>8</depth>
<persistent>0</persistent>
<parentName><undefined></parentName>
<maskName><undefined></maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>///A flagpole! Lets Mario complete a level
//Make a flag
flag = instance_create(x+10,y+17,obj_flag)
//Do not animate
image_speed = 0
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>///Stop Mario from jumping over the flagpole.
if collision_rectangle(bbox_left,-96,bbox_right,y,obj_mario,0,0)
{
//Stop Mario if he goes too far
if obj_mario.x > x
obj_mario.x = x
//Workaround to prevent sliding Mario from going over the flagpole.
if instance_exists(obj_slider)
{
if obj_slider.x > x
obj_slider.x = x
}
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="obj_mario">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>///Turn Mario into goal Mario
//Make the flag move down
flag.vspeed = 1.5
//Create the appropriate point object based on Mario's height
if other.y < y+16
with instance_create(x,other.y,obj_score) event_user(7)
else if other.y < y+32
with instance_create(x,other.y,obj_score) event_user(6)
else if other.y < y+48
with instance_create(x,other.y,obj_score) event_user(5)
else if other.y < y+64
with instance_create(x,other.y,obj_score) event_user(4)
else if other.y < y+80
with instance_create(x,other.y,obj_score) event_user(3)
else if other.y < y+96
with instance_create(x,other.y,obj_score) event_user(2)
else if other.y < y+112
with instance_create(x,other.y,obj_score) event_user(1)
else
with instance_create(x,other.y,obj_score) event_user(0)
//Revert
if global.powerup = cs_gold
{
instance_create(x,y,obj_gold_explosion);
with (instance_create(x,y,obj_gold_explosion))
{
value = 0.055;
}
with (instance_create(x,y,obj_gold_explosion))
{
value = 0.03;
}
global.powerup = cs_fire;
}
//Create goal Mario
instance_create(x+9,other.y,obj_goalmario)
//Destroy Mario
with other instance_destroy()
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints>
<point>0,0</point>
<point>80,80</point>
</PhysicsShapePoints>
</object>