Creature placer spawnpoint not changing

Am I loco?

Suppose the code

Updated Question:

OnButtonTriggered(Agent : agent) : void=
    Values := for(CreaturePlacer : SpawnPoints):
        var Transform : transform = CreaturePlacer.GetTransform()
        Print("oX: {Transform.Translation.X} oY: {Transform.Translation.Y}")
        var NewPosition :vector3 = vector3
        {
            X := Transform.Translation.X + GetRandomFloat(-10000.0, 10000.0),
            Y := Transform.Translation.Y + GetRandomFloat(-10000.0, 10000.0),
            Z := Transform.Translation.Z + 5000.0
        }
    Print("NewX: {NewPosition.X} NewY: {NewPosition.Y}")
    if (CreaturePlacer.TeleportTo[NewPosition, Transform.Rotation]):
        CreaturePlacer.Spawn()
        Print("Finished Teleporting")
        Print("nX: {Transform.Translation.X} nY: {Transform.Translation.Y}")




The teleport now works, however, the spawn point doesn’t seem to change.
I.e., the creature’s vfx blinks in the direction it’s teleported, and the creature_placer_device teleports. But, immediately after the creature itself appears back in the original location.

Anyone know why the creature’s spawnpoint doesn’t move with the placer?

Ty

Hey dude, I didn’t test your code but shifting the spawner by 100.0 units seem really small, maybe increase this number?

1 Like

Hi, thanks for pointing that out. 100 units was not enough to notice, I’ve now changed it to 10k. Which confirms that the TeleportTo[ ] does work, although, my new problem is that the spawned creature does not respect the placer’s new location.

I’ve updated the post with my new code & problem.

Hey, can you test out this script :

OnButtonTriggered(Agent : agent) : void=
    spawn{_OnButtonTriggered(Agent)}

_OnButtonTriggered(Agent : agent)<suspends>: void=
    Values := for(CreaturePlacer : SpawnPoints):
        var Transform : transform = CreaturePlacer.GetTransform()
        Print("oX: {Transform.Translation.X} oY: {Transform.Translation.Y}")
        var NewPosition :vector3 = vector3
        {
            X := Transform.Translation.X + GetRandomFloat(-10000.0, 10000.0),
            Y := Transform.Translation.Y + GetRandomFloat(-10000.0, 10000.0),
            Z := Transform.Translation.Z + 5000.0
        }
    Print("NewX: {NewPosition.X} NewY: {NewPosition.Y}")
    if (CreaturePlacer.TeleportTo[NewPosition, Transform.Rotation]):
        Sleep(1.0)
        CreaturePlacer.Spawn()
        Print("Finished Teleporting")
        Print("nX: {Transform.Translation.X} nY: {Transform.Translation.Y}")

I added a 1.0 Sleep after the teleport so the game has actually time to compute it. If it works, try decreasing the Sleep to 0.0, or find the lowest value that works.

1 Like

Unfortunately not, after the sleep the creature spawns at the original location.

Immediately after pressing button

Just after sleep finished

Creature spawning

Ok maybe it’s a bug then :smiley:

You can report the issue here if you want, maybe try with different creature spawners than the placer one :person_shrugging:

https://creative.fortnite.com/s/bug-report?language=en_US

1 Like

I’m trying to solve this same problem. Did you ever figure anything out?

It’s a bug I think, teleporting the placer doesn’t actually change the spawn location.

The workaround was to teleport the entity that the placer spawns.

So I’d put the placer somewhere decently far away (But still in render distance, so that it doesn’t get unloaded by world partition), and then I’d subscribe to the “OnSpawned” event, and teleport the Agent you get from that.

It’s not ideal, but it worked for me. Unfortunately the placers are still buggy, and can sometimes spawn 2 units when you expect one. If that’s a problem, might be worth making some kind of work around.

Yeah I’m trying to figure out a better solution, I have hundreds and hundreds of creature placers spanning quite a large area/distance. So simple tricks will not suffice.

There can only be 90~ active AI at once iirc. That includes all AI in your level, including creatures.

I went with a pooling system where I track which placers are in-use. Then I can call “System.SpawnCreature(Position)”. This function will find a placer that currently isn’t in-use and spawn the creature, then teleport it to Position.

Probably the most elegant you can get it in current verse unfortunately.

I dont understand how you bypass the “Activation Range” on creature placers?

Good question, I don’t remember lol.

If the player is outside the activation range what does that mean? If it’s just that the creature won’t spawn if the player is outside that range, then you can use the .Spawn() method to forcibly spawn the creature. Then catch the creature in the OnSpawnedEvent and then .Teleport().

The creature should follow the player if they’re close. If the player isn’t close, the creature can sometimes try to run back to its placer: It’s kinda crap.

Honestly, you have to get hacky with the stuff you do right now in Verse. It’s not ready for sizable game development.

If you’re not already on the discord, I recommend it: Fortnite Creative & UEFN Official.

Yeah so my tests show that I cannot intercept the creature by forcing spawn. If you run spawn() it just sort of primes it, and when you get inside the activation range then it actually spawns the creature. Once it is spawned I can tp it no issue with that. I’ve submitted a bug report. But since they have not really updated the creatures in a long time im not getting my hopes up. Being able to teleport the placers/spawnpoints would be great, it would solve so much and free up so much memory.

We are doing a pretty large scale project with a sizeable team.

I am on the UEFN discord as well, but I cannot seem to find a solution for this. So I will probably just have to deal with the placers eating up memory.

And don’t get me started on the hacky stuff :smiley: I’ve done so much it.

Haha, same - although I haven’t been using Verse recently.

Are you using placers or spawners? Because I was 100% sure you could use .Spawn() on a placer (In the past anyway). Just not spawners.

Anyway, good luck with your project :slight_smile:

In that case that must have changed, since I cannot possibly do it, and I’ve tried so many things but I cant get past the activation range issue. I am using placers since creature spawners does not even have a Spawn() function. With creature spawners you are at the mercy with their timed spawn system, which sucks.

I used spawners and moveto the spawner above the user location, then enabled it…then since I was already tracking player location I just kept checking if the player location exceeded 40m or whatever you want…and then have it moveto above the player again… the problem here is during the moveto I run into glitching (character bouncing / lag) … which was unacceptable for me… teleport had similar issues but also would lose the activation range