Compare commits
2 commits
abfeb2982c
...
df7450e45d
Author | SHA1 | Date | |
---|---|---|---|
df7450e45d | |||
9c31443354 |
5 changed files with 167 additions and 2 deletions
|
@ -43,6 +43,10 @@
|
||||||
"$path": "out/src/StarterPlayer/StarterCharacterScripts"
|
"$path": "out/src/StarterPlayer/StarterCharacterScripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"StarterPack": {
|
||||||
|
"$className": "StarterPack",
|
||||||
|
"$path": "out/src/StarterPack"
|
||||||
|
},
|
||||||
"Workspace": {
|
"Workspace": {
|
||||||
"$className": "Workspace",
|
"$className": "Workspace",
|
||||||
"$properties": {
|
"$properties": {
|
||||||
|
|
|
@ -16,5 +16,6 @@ Ui theming is based on Catppucin Mocha. You can find the colors [here](https://g
|
||||||
# Todo
|
# Todo
|
||||||
* __Work on next:__ Better null checking for the clientState.character (can cause errors atm)
|
* __Work on next:__ Better null checking for the clientState.character (can cause errors atm)
|
||||||
* __Work on next:__ Add guns
|
* __Work on next:__ Add guns
|
||||||
|
* Unscuff [`./src/ServerScriptService/ecs/systems/server/toolHandler.ts`](./src/ServerScriptService/ecs/systems/server/toolHandler.ts)
|
||||||
* Add tests
|
* Add tests
|
||||||
* Add the bound tags in [`./src/ReplicatedStorage/ecs/boundTags.ts`](./src/ReplicatedStorage/ecs/boundTags.ts)
|
* Add the bound tags in [`./src/ReplicatedStorage/ecs/boundTags.ts`](./src/ReplicatedStorage/ecs/boundTags.ts)
|
|
@ -11,7 +11,9 @@ function toolHandler(world: World): void {
|
||||||
|
|
||||||
for (const [_] of useEvent(character.equippedTool, "Activated")) {
|
for (const [_] of useEvent(character.equippedTool, "Activated")) {
|
||||||
print(Players.LocalPlayer.GetMouse())
|
print(Players.LocalPlayer.GetMouse())
|
||||||
activateToolEvent.FireServer(Players.LocalPlayer.GetMouse().Hit.Position)
|
activateToolEvent.FireServer(
|
||||||
|
Players.LocalPlayer.GetMouse().Hit.Position
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ function toolHandler(world: World, state: ServerState): void {
|
||||||
// We don't want a bunch of if statements...
|
// We don't want a bunch of if statements...
|
||||||
|
|
||||||
// example tool - spawns a part at cursor pos
|
// example tool - spawns a part at cursor pos
|
||||||
if (character.equippedTool.Name === "example tool") {
|
if (character.equippedTool.Name === "Example Tool") {
|
||||||
Make("Part", {
|
Make("Part", {
|
||||||
Position: hitPos,
|
Position: hitPos,
|
||||||
Anchored: false,
|
Anchored: false,
|
||||||
|
|
158
src/StarterPack/Example Tool.rbxmx
Normal file
158
src/StarterPack/Example Tool.rbxmx
Normal file
|
@ -0,0 +1,158 @@
|
||||||
|
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
|
||||||
|
<Meta name="ExplicitAutoJoints">true</Meta>
|
||||||
|
<External>null</External>
|
||||||
|
<External>nil</External>
|
||||||
|
<Item class="Tool" referent="RBX728BFDA69A184704A452193F59CE3428">
|
||||||
|
<Properties>
|
||||||
|
<BinaryString name="AttributesSerialize"></BinaryString>
|
||||||
|
<bool name="CanBeDropped">true</bool>
|
||||||
|
<bool name="Enabled">true</bool>
|
||||||
|
<CoordinateFrame name="Grip">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
<R00>1</R00>
|
||||||
|
<R01>0</R01>
|
||||||
|
<R02>0</R02>
|
||||||
|
<R10>0</R10>
|
||||||
|
<R11>1</R11>
|
||||||
|
<R12>0</R12>
|
||||||
|
<R20>0</R20>
|
||||||
|
<R21>0</R21>
|
||||||
|
<R22>1</R22>
|
||||||
|
</CoordinateFrame>
|
||||||
|
<token name="LevelOfDetail">0</token>
|
||||||
|
<bool name="ManualActivationOnly">false</bool>
|
||||||
|
<CoordinateFrame name="ModelMeshCFrame">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
<R00>1</R00>
|
||||||
|
<R01>0</R01>
|
||||||
|
<R02>0</R02>
|
||||||
|
<R10>0</R10>
|
||||||
|
<R11>1</R11>
|
||||||
|
<R12>0</R12>
|
||||||
|
<R20>0</R20>
|
||||||
|
<R21>0</R21>
|
||||||
|
<R22>1</R22>
|
||||||
|
</CoordinateFrame>
|
||||||
|
<SharedString name="ModelMeshData">yuZpQdnvvUBOTYh1jqZ2cA==</SharedString>
|
||||||
|
<Vector3 name="ModelMeshSize">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
</Vector3>
|
||||||
|
<token name="ModelStreamingMode">0</token>
|
||||||
|
<string name="Name">Example Tool</string>
|
||||||
|
<bool name="NeedsPivotMigration">false</bool>
|
||||||
|
<Ref name="PrimaryPart">null</Ref>
|
||||||
|
<bool name="RequiresHandle">true</bool>
|
||||||
|
<float name="ScaleFactor">1</float>
|
||||||
|
<int64 name="SourceAssetId">-1</int64>
|
||||||
|
<BinaryString name="Tags"></BinaryString>
|
||||||
|
<Content name="TextureId"><null></null></Content>
|
||||||
|
<string name="ToolTip"></string>
|
||||||
|
<OptionalCoordinateFrame name="WorldPivotData"></OptionalCoordinateFrame>
|
||||||
|
</Properties>
|
||||||
|
<Item class="Part" referent="RBX239E42D696874BAD95E225944B709DD7">
|
||||||
|
<Properties>
|
||||||
|
<bool name="Anchored">false</bool>
|
||||||
|
<BinaryString name="AttributesSerialize"></BinaryString>
|
||||||
|
<float name="BackParamA">-0.5</float>
|
||||||
|
<float name="BackParamB">0.5</float>
|
||||||
|
<token name="BackSurface">0</token>
|
||||||
|
<token name="BackSurfaceInput">0</token>
|
||||||
|
<float name="BottomParamA">-0.5</float>
|
||||||
|
<float name="BottomParamB">0.5</float>
|
||||||
|
<token name="BottomSurface">0</token>
|
||||||
|
<token name="BottomSurfaceInput">0</token>
|
||||||
|
<CoordinateFrame name="CFrame">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
<R00>1</R00>
|
||||||
|
<R01>0</R01>
|
||||||
|
<R02>0</R02>
|
||||||
|
<R10>0</R10>
|
||||||
|
<R11>1</R11>
|
||||||
|
<R12>0</R12>
|
||||||
|
<R20>0</R20>
|
||||||
|
<R21>0</R21>
|
||||||
|
<R22>1</R22>
|
||||||
|
</CoordinateFrame>
|
||||||
|
<bool name="CanCollide">true</bool>
|
||||||
|
<bool name="CanQuery">true</bool>
|
||||||
|
<bool name="CanTouch">true</bool>
|
||||||
|
<bool name="CastShadow">true</bool>
|
||||||
|
<string name="CollisionGroup">Default</string>
|
||||||
|
<int name="CollisionGroupId">0</int>
|
||||||
|
<Color3uint8 name="Color3uint8">4288914085</Color3uint8>
|
||||||
|
<PhysicalProperties name="CustomPhysicalProperties">
|
||||||
|
<CustomPhysics>false</CustomPhysics>
|
||||||
|
</PhysicalProperties>
|
||||||
|
<bool name="EnableFluidForces">true</bool>
|
||||||
|
<float name="FrontParamA">-0.5</float>
|
||||||
|
<float name="FrontParamB">0.5</float>
|
||||||
|
<token name="FrontSurface">0</token>
|
||||||
|
<token name="FrontSurfaceInput">0</token>
|
||||||
|
<float name="LeftParamA">-0.5</float>
|
||||||
|
<float name="LeftParamB">0.5</float>
|
||||||
|
<token name="LeftSurface">0</token>
|
||||||
|
<token name="LeftSurfaceInput">0</token>
|
||||||
|
<bool name="Locked">false</bool>
|
||||||
|
<bool name="Massless">false</bool>
|
||||||
|
<token name="Material">256</token>
|
||||||
|
<string name="MaterialVariantSerialized"></string>
|
||||||
|
<string name="Name">Handle</string>
|
||||||
|
<CoordinateFrame name="PivotOffset">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
<R00>1</R00>
|
||||||
|
<R01>0</R01>
|
||||||
|
<R02>0</R02>
|
||||||
|
<R10>0</R10>
|
||||||
|
<R11>1</R11>
|
||||||
|
<R12>0</R12>
|
||||||
|
<R20>0</R20>
|
||||||
|
<R21>0</R21>
|
||||||
|
<R22>1</R22>
|
||||||
|
</CoordinateFrame>
|
||||||
|
<float name="Reflectance">0</float>
|
||||||
|
<float name="RightParamA">-0.5</float>
|
||||||
|
<float name="RightParamB">0.5</float>
|
||||||
|
<token name="RightSurface">0</token>
|
||||||
|
<token name="RightSurfaceInput">0</token>
|
||||||
|
<int name="RootPriority">0</int>
|
||||||
|
<Vector3 name="RotVelocity">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
</Vector3>
|
||||||
|
<int64 name="SourceAssetId">-1</int64>
|
||||||
|
<BinaryString name="Tags"></BinaryString>
|
||||||
|
<float name="TopParamA">-0.5</float>
|
||||||
|
<float name="TopParamB">0.5</float>
|
||||||
|
<token name="TopSurface">0</token>
|
||||||
|
<token name="TopSurfaceInput">0</token>
|
||||||
|
<float name="Transparency">0</float>
|
||||||
|
<Vector3 name="Velocity">
|
||||||
|
<X>0</X>
|
||||||
|
<Y>0</Y>
|
||||||
|
<Z>0</Z>
|
||||||
|
</Vector3>
|
||||||
|
<token name="formFactorRaw">1</token>
|
||||||
|
<token name="shape">1</token>
|
||||||
|
<Vector3 name="size">
|
||||||
|
<X>1</X>
|
||||||
|
<Y>1</Y>
|
||||||
|
<Z>1</Z>
|
||||||
|
</Vector3>
|
||||||
|
</Properties>
|
||||||
|
</Item>
|
||||||
|
</Item>
|
||||||
|
<SharedStrings>
|
||||||
|
<SharedString md5="yuZpQdnvvUBOTYh1jqZ2cA=="></SharedString>
|
||||||
|
</SharedStrings>
|
||||||
|
</roblox>
|
Loading…
Add table
Add a link
Reference in a new issue