Summary
I have to teleport vending machines in because the vending machines automatically cycle to the next item and I want the next item to be available for purchase later on in the game. Why do we have a ‘Cycle to Next Item’ function to call if the item is going to be cycled every 5 seconds? Am I missing something? I’ll submit a feature request for that ability but I’m confused as to why this function exist if we don’t really have control over when it is cycled.
Moving on to my work around, I cycle in the vending machines using teleportTo() and vector coordinates. It was my first time using vectors in Verse so that was cool but it was an extremely large amount of work to do something that could be a tickbox on the vending machine. And then it doesn’t work. Please see the Verse code for the ‘vending manager device’
@editable
CastleTransform : transform = transform{
Translation := vector3{X := 100.0, Y := 200.0, Z := 0.0},
Rotation := MakeRotationFromYawPitchRollDegrees(YawRightDegrees := 0.0, PitchUpDegrees := 0.0, RollClockwiseDegrees := 0.0),
Scale := vector3{X := 1.0, Y := 1.0, Z := 1.0}
}
@editable
IceHouseTransform : transform = transform{
Translation := vector3{X := 300.0, Y := 200.0, Z := 0.0},
Rotation := MakeRotationFromYawPitchRollDegrees(YawRightDegrees := 0.0, PitchUpDegrees := 0.0, RollClockwiseDegrees := 0.0),
Scale := vector3{X := 1.0, Y := 1.0, Z := 1.0}
}
@editable
IceChairTransform : transform = transform{
Translation := vector3{X := 500.0, Y := 200.0, Z := 0.0},
Rotation := MakeRotationFromYawPitchRollDegrees(YawRightDegrees := 0.0, PitchUpDegrees := 0.0, RollClockwiseDegrees := 0.0),
Scale := vector3{X := 1.0, Y := 1.0, Z := 1.0}
}
@editable
ArcticTransform : transform = transform{
Translation := vector3{X := 700.0, Y := 200.0, Z := 0.0},
Rotation := MakeRotationFromYawPitchRollDegrees(YawRightDegrees := 0.0, PitchUpDegrees := 0.0, RollClockwiseDegrees := 0.0),
Scale := vector3{X := 1.0, Y := 1.0, Z := 1.0}
}
@editable
var CastleVMs : []vending_machine_device = array{}
@editable
var IceHouseVMs : []vending_machine_device = array{}
@editable
var IceChairVMs : []vending_machine_device = array{}
@editable
var ArcticVMs : []vending_machine_device = array{}
# Transform to send the vending machine to when 'hiding'
@editable
var HideTransform : transform = transform{
Translation := vector3{X := 0.0, Y := 0.0, Z := -1000.0},
Rotation := MakeRotationFromYawPitchRollDegrees(YawRightDegrees := 0.0, PitchUpDegrees := 0.0, RollClockwiseDegrees := 0.0),
Scale := vector3{X := 1.0, Y := 1.0, Z := 1.0}
}
# Meant to be called on the first wave.
SpawnVendingMachines(Wave: int)<decides><transacts>: void =
if (0 < Wave < 4):
# Remove current vending machines
# Bring in next round of vending machines
if (Wave < CastleVMs.Length):
CastleVMs[Wave - 1].TeleportTo[HideTransform]
CastleVMs[Wave].TeleportTo[CastleTransform]
if (Wave < IceHouseVMs.Length):
IceHouseVMs[Wave - 1].TeleportTo[HideTransform]
IceHouseVMs[Wave].TeleportTo[IceHouseTransform]
if (Wave < IceChairVMs.Length):
IceChairVMs[Wave - 1].TeleportTo[HideTransform]
IceChairVMs[Wave].TeleportTo[IceChairTransform]
if (Wave < ArcticVMs.Length):
ArcticVMs[Wave - 1].TeleportTo[HideTransform]
ArcticVMs[Wave].TeleportTo[ArcticTransform]
TeleportTimer(Timer: timer_device)<decides><transacts>:void=
Timer.TeleportTo[HideTransform]
Also this is where I call the function in my ‘snow_device’.
if (IN_Vending_Manager.SpawnVendingMachines[Phase])
The snow_device has a bug of it’s own and I’m submitting that report right after this so I’ll comment with that link but I don’t think the rest of that code is necessary for this issue but it will be there if you want to look at it.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Devices
Steps to Reproduce
Put in a vending machine and then use verse to teleport it.
Expected Result
Vending machine will grant item like normal
Observed Result
The vending machine takes your money but doesn’t grant the item
Platform(s)
Windows
Island Code
2116-3890-0280
Video
Additional Notes
I tried to call enable on the devices in verse but got the error about a norollback effect and since I’m indexing into an array I need to do it in a failure context. But I shouldn’t have to disable or enable them anyways because they’re all enabled and clearly taking money.