Skip to content

Commit 5c8eb72

Browse files
committed
Update player.script
1 parent 8d14e1d commit 5c8eb72

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

model/character/example/character/player.script

+16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
function init(self)
22
msg.post(".", "acquire_input_focus")
33
model.play_anim("#model", "T-Pose", go.PLAYBACK_LOOP_FORWARD)
4+
5+
-- enabled and disable meshes to get the correct look
6+
-- weapons
7+
model.set_mesh_enabled("#model", "1H_Sword", true)
8+
model.set_mesh_enabled("#model", "1H_Sword_Offhand", false)
9+
model.set_mesh_enabled("#model", "2H_Sword", false)
10+
11+
-- equipment
12+
model.set_mesh_enabled("#model", "Knight_Helmet", true)
13+
model.set_mesh_enabled("#model", "Knight_Cape", true)
14+
15+
-- different shields
16+
model.set_mesh_enabled("#model", "Spike_Shield", true)
17+
model.set_mesh_enabled("#model", "Round_Shield", false)
18+
model.set_mesh_enabled("#model", "Rectangle_Shield", false)
19+
model.set_mesh_enabled("#model", "Badge_Shield", false)
420
end
521

622
function on_input(self, action_id, action)

0 commit comments

Comments
 (0)