Summary
The rotation is supposed to be an optional parameter however it is required and is a weird type that does not follow any regular syntax.
SpawnFiendT1()<suspends>:void=
Transform:=FiendCreatureSpawnerT1.GetTransform()
Position:=Transform.Translation
#Position:=Transform.Translation
BaseRotation:rotation= MakeRotationFromYawPitchRollDegrees(0.0,0.0,0.0)
FiendCreatureSpawnerT1.SpawnAt(Position,OptionalRotation : ?rotation = option{BaseRotation})
#This gives the error: This function parameter expects a value of type tuple(vector3,?Rotation:?rotation = …), but this argument is an incompatible value of type tuple(vector3,?rotation).
#You also cannot leave the rotation parameter blank as it gives the error:
This function parameter expects a value of type tuple(vector3,?Rotation:?rotation = …), but this argument is an incompatible value of type vector3.
#A community member gave the solution to do
FiendCreatureSpawnerT1.SpawnAt(Position,?Rotation:=option. FromRotation(BaseRotation))
#This does compile but is not normal syntax for verse.
If you use /UnrealEngine.com/Temporary/SpatialMath
SpawnFiendT2():void=
Transform:=FiendCreatureSpawnerT2.GetTransform()
Position:=FromVector3(Transform.Translation)
#Position:=Transform.Translation
#BaseRotation:rotation= MakeRotationFromYawPitchRollDegrees(0.0,0.0,0.0)
FiendCreatureSpawnerT2.SpawnAt(Position)
#This does compile but does spawn the creature
The function is defined as using /Verse.org/SpatialMath in the documentation but does not take in the parameters properly as you the rotation is not actually optionable
Either way it does not seem like this implementation is working correctly. No other devices that use option parameters are required to be implemented this way.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Devices
Steps to Reproduce
Use the SpawnAt() function with the creature spawner and try to input the rotation parameter or leave it blank.
I’m assuming the other guard and wild life spawners behave the same way.
Expected Result
The function accepts a blank rotation as it is optionable or accepts a rotation. Spawns the creature.
Observed Result
Gives the errors specified above.
Platform(s)
PC
Additional Notes
There needs to be more consistency with devices. You can tell that different devices were designed by different developers. Some of the NPC spawners have a SpawnAt function. Some have Spawn direct event binding while others do not, some you can assign to a team with the devices others you need to use verse.