-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkuff_custom_weapons
121 lines (96 loc) · 4.2 KB
/
kuff_custom_weapons
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
using {/Fortnite.com/Devices}
using {/Fortnite.com/UI}
using {/Fortnite.com/Game}
using {/Fortnite.com/Characters}
using {/Fortnite.com/Playspaces}
using {/Verse.org/Simulation}
using {/Verse.org/Random}
using {/UnrealEngine.com/Temporary/Diagnostics}
using {/UnrealEngine.com/Temporary/UI}
using {/UnrealEngine.com/Temporary/SpatialMath}
kuff_custom_weapons := class(creative_device):
@editable
ItemDetector1:conditional_button_device = conditional_button_device{}
@editable
ItemDetector2:conditional_button_device = conditional_button_device{}
@editable
ItemDetector3:conditional_button_device = conditional_button_device{}
@editable
ItemDetector4:conditional_button_device = conditional_button_device{}
@editable
ItemDetector5:conditional_button_device = conditional_button_device{}
@editable
ItemDetector6:conditional_button_device = conditional_button_device{}
@editable
ItemDetector7:conditional_button_device = conditional_button_device{}
@editable
Powerup1:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup2:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup3:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup4:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup5:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup6:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
Powerup7:visual_effect_powerup_device = visual_effect_powerup_device{}
@editable
PowerupClear:visual_effect_powerup_device = visual_effect_powerup_device{}
OnBegin<override>()<suspends>:void=
spawn:
CheckForItem()
CheckForItem()<suspends>:void=
loop:
Sleep(0.5)
AllPlayers := GetPlayspace().GetPlayers()
for(Player:AllPlayers):
if(IsAgent := agent[Player]):
if(ItemDetector1.IsHoldingItem[IsAgent]):
ActivatePowerup1(IsAgent)
else:
if(ItemDetector2.IsHoldingItem[IsAgent]):
ActivatePowerup2(IsAgent)
else:
if(ItemDetector3.IsHoldingItem[IsAgent]):
ActivatePowerup3(IsAgent)
else:
if(ItemDetector4.IsHoldingItem[IsAgent]):
ActivatePowerup4(IsAgent)
else:
if(ItemDetector5.IsHoldingItem[IsAgent]):
ActivatePowerup5(IsAgent)
else:
if(ItemDetector6.IsHoldingItem[IsAgent]):
ActivatePowerup6(IsAgent)
else:
if(ItemDetector7.IsHoldingItem[IsAgent]):
ActivatePowerup7(IsAgent)
else:
ActivatePowerupClear(IsAgent)
ActivatePowerup1(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup1.Pickup(Agent)
ActivatePowerup2(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup2.Pickup(Agent)
ActivatePowerup3(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup3.Pickup(Agent)
ActivatePowerup4(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup4.Pickup(Agent)
ActivatePowerup5(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup5.Pickup(Agent)
ActivatePowerup6(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup6.Pickup(Agent)
ActivatePowerup7(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
Powerup7.Pickup(Agent)
ActivatePowerupClear(Agent:agent):void=
if(FC := Agent.GetFortCharacter[]):
PowerupClear.Pickup(Agent)