forked from fachinformatiker/undertale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobj_asgorespear.object.gmx
162 lines (162 loc) · 6.04 KB
/
obj_asgorespear.object.gmx
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
161
162
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_asgorespear</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>11</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>angle= -25;
siner= 0;
armtest= 1;
color= 255;
debuggo= 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" 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>if(keyboard_check(37/* LEFT */) && debuggo == 1) {
angle-= 8;
if(keyboard_check(16/* SHIFT */)) angle-= 16;
if(keyboard_check(13/* ENTER */)) {
simg= instance_create(x, y, 486/* obj_spearafterimage */);
simg.originx= x;
simg.originy= y;
simg.outx= x + lengthdir_x(320, angle + 8);
simg.outy= y + lengthdir_y(320, angle + 8);
simg.outx2= x + lengthdir_x(320, angle - 40);
simg.outy2= y + lengthdir_y(320, angle - 40);
simg.color= color;
simg2= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg2.angle= angle - 16;
simg2.alpha-= 0.017;
simg2.color= color;
simg3= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg3.angle= angle - 40;
simg3.color= color;
simg4= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg4.angle= angle + 8;
simg4.alpha-= 0.034;
simg4.color= color;
angle-= 40;
}
}
if(keyboard_check(39/* RIGHT */) && debuggo == 1) {
angle+= 8;
if(keyboard_check(16/* SHIFT */)) angle+= 16;
if(keyboard_check(13/* ENTER */)) {
simg= instance_create(x, y, 486/* obj_spearafterimage */);
simg.originx= x;
simg.originy= y;
simg.outx= x + lengthdir_x(320, angle - 8);
simg.outy= y + lengthdir_y(320, angle - 8);
simg.outx2= x + lengthdir_x(320, angle + 40);
simg.outy2= y + lengthdir_y(320, angle + 40);
simg.color= color;
simg2= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg2.angle= angle + 16;
simg2.alpha-= 0.017;
simg2.color= color;
simg3= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg3.angle= angle + 40;
simg3.color= color;
simg4= instance_create(x, y, 487/* obj_spearafterimage2 */);
simg4.angle= angle - 8;
simg4.alpha-= 0.034;
simg4.color= color;
angle+= 40;
}
}
siner++;
y+= sin(siner / 15) * 0.3;
angle+= sin(siner / 15) * 0.02;
xhand1= lengthdir_x(55, angle);
yhand1= lengthdir_y(55, angle);
rdistx= x + xhand1 * 2;
rdisty= y + yhand1 * 2;
if(armtest == 1 && instance_exists(488/* obj_asgoreb_body */)) {
point1y= obj_asgoreb_body.party[5] + 64 + obj_asgoreb_body.y;
point1x= obj_asgoreb_body.partx[5] + 14 + obj_asgoreb_body.x;
armlength= point_distance(point1x, point1y, x - xhand1, y - yhand1);
armangle= point_direction(point1x, point1y, x - xhand1, y - yhand1);
armsize= armlength / 40;
if(armsize < 0.35) armsize= 0;
draw_sprite_ext(609/* spr_asgoreb_ballarm */, 0, point1x, point1y, armsize * 2, 2, armangle, 16777215, 1);
point1y= obj_asgoreb_body.party[4] + 64 + obj_asgoreb_body.y;
point1x= obj_asgoreb_body.partx[4] + 34 + obj_asgoreb_body.x;
armlength= point_distance(point1x, point1y, rdistx, rdisty);
if(armlength > 100) {
armoff= (armlength - 100) / 2;
rdistx= x + lengthdir_x(55 - armoff, angle) * 2;
rdisty= y + lengthdir_y(55 - armoff, angle) * 2;
armlength= point_distance(point1x, point1y, rdistx, rdisty);
}
armangle= point_direction(point1x, point1y, rdistx, rdisty);
if(armangle > 100) point1y-= 12;
armsize= armlength / 40;
if(armsize < 0.6) armsize= 0;
draw_sprite_ext(609/* spr_asgoreb_ballarm */, 0, point1x, point1y, armsize * 2, 2, armangle, 16777215, 1);
}
if(keyboard_check(49/* 1 */) && debuggo == 1) color= 255;
if(keyboard_check(50/* 2 */) && debuggo == 1) color= 4235519;
if(keyboard_check(51/* 3 */) && debuggo == 1)
color= make_color_rgb(90, 130, 255);
draw_sprite_ext(sprite_index, image_index, x, y, 2, 2, angle, color, 1);
draw_sprite_ext(618/* spr_spearhandr */, image_index, rdistx, rdisty, 2, 2, angle, 16777215, 1);
draw_sprite_ext(619/* spr_spearhandl */, image_index, x - xhand1, y - yhand1, 2, 2, angle, 16777215, 1);
</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/>
</object>