This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#usage example (when subscribing to an event that returns an agent) | |
ButtonDevice.InteractedWithEvent.SubscribeAgent(OnButtonInteract, "Hello!") | |
OnButtonInteract(Agent : agent, Text : string) : void = | |
Print("Button interacted with {Text}!") | |
#usage example (when subscribing to an event that returns tuple(), aka an empty tuple) | |
CampfireDevice.CampfirePulseEvent.SubscribeEmpty(OnCampfirePulse, 90210) | |
OnCampfirePulse(Number : int) : void = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Begin Object Class=/Script/UnrealEd.MaterialGraphNode_Root Name="MaterialGraphNode_Root_16" | |
Material=/Script/UnrealEd.PreviewMaterial'"/Engine/Transient.PreviewMaterial_2"' | |
NodePosX=144 | |
NodePosY=-80 | |
NodeGuid=DA645A0D405D999F05550EB2B20E74E3 | |
CustomProperties Pin (PinId=94B10B244638D93ADC813DA0DB8A360A,PinName="Base Color",PinType.PinCategory="materialinput",PinType.PinSubCategory="5",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,) | |
CustomProperties Pin (PinId=2BA1B6FE4FAF4CE973853CAD1EB7925E,PinName="Metallic",PinType.PinCategory="materialinput",PinType.PinSubCategory="6",PinType.P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global := class<varies><concrete>(): | |
var MaybeMainDevice : ?main_device = false | |
GetMainDevice():main_device = | |
if(MainDevice := Global.MaybeMainDevice?) then MainDevice else main_device{} | |
Global : global = global{} | |
#in the device's OnBegin you call | |
set Global.MaybeMainDevice = option{Self} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#> Usage | |
MyRoutine := SpawnRoutine(SomeLongRunningTask) | |
MyRoutine.Cancel() | |
SpawnRoutine<public>(Func : type{_()<suspends>:void}):routine = | |
Routine := routine{Func := Func} | |
Routine.Start() | |
return Routine | |
routine<public> := class(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#> Usage | |
Routine := SpawnRoutine(SomeLongTask) | |
Routine.Cancel() | |
SpawnRoutine(Func : type{_()<suspends>:void}):routine = | |
Routine := routine{Func := Func} | |
Routine.Start() | |
return Routine | |
routine := class(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#> Usage: | |
SortedItems := Sort(Items, true, CompareInt) | |
Sort(Items : []t, IsAscending : logic, Comparer: type{_(:t, :t)<computes> : int} where t : type)<computes> : []t = | |
if (Items.Length > 1, Pivot := Items[Floor(Items.Length/2)]): | |
Left := for(Item : Items, Comparer(Item, Pivot) = -1) do Item | |
Middle := for(Item : Items, Comparer(Item, Pivot) = 0) do Item | |
Right := for(Item : Items, Comparer(Item, Pivot) = 1) do Item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using { /Verse.org/Simulation } | |
using { /Verse.org/Verse } | |
using { /Verse.org/Colors } | |
using { /Verse.org/Random } | |
using { /UnrealEngine.com/Temporary/UI } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/UI } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using { /Verse.org/Simulation } | |
using { /UnrealEngine.com/Temporary/SpatialMath } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/Characters } | |
movechecker_device := class(creative_device): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FormatRoundedFloatAsString(Input : float, NumDigitsAfterDecimal : int) : string = | |
if: | |
Multiplier := Pow(10.0, NumDigitsAfterDecimal * 1.0) | |
RoundedValue := float[Round[Input * Multiplier] * 1.0] / Multiplier | |
BeforeDecimal := Floor[RoundedValue] | |
AfterDecimal := Abs(Round[(RoundedValue - BeforeDecimal * 1.0)*Multiplier]) | |
var AfterDecimalString : string = ToString(AfterDecimal) | |
#pad the number after the decimal with leading zeroes | |
for (It := 0..(NumDigitsAfterDecimal - AfterDecimalString.Length - 1)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using { /Verse.org/Simulation } | |
using { /UnrealEngine.com/Temporary/SpatialMath } | |
using { /Fortnite.com/Devices } | |
using { /Fortnite.com/Characters } | |
movement_detector_device := class(creative_device): | |
@editable | |
MinimumMovementDistance : float = 100.0 |
NewerOlder