Jump to content

Set a Random Spawner spawn an specific actor first


Recommended Posts

Hello, well, since I did't manage to properly get this working I decided to finally look for some help online.

The thing here is that I´m working on a mod that add new weapons by using a random spawner where the weapons are located by default.

Some of these weapons are stronger than the regular variants so, in order to give some sort of diynamic progression the idea is to make the spawner spawn a specific gun first and then go jam and spawn whatever it wants. And there´s the problem, no matter what I did I just couldn´t tell the game "Hey look I got the ssg, now drop the cooler ones next level"

 

Here´s the code for what i've tried:

SSGSpawners.zip

Share this post


Link to post
Posted (edited)

Okay barring the loads of complications that can go wrong, I found the spot is causing the most issues. And its fairly simple: A_Jump(xx, boom) the X number runs off x/255 format where 255 is guranteed jump to that state. On the MoreSPawns state if all those fail to make the jump then falls through to the Spawn1 state.  Right above the MoreSpawns state, the A_jump and Goto practically always makes it jump to Spawn1.  Even if the SSG1st item gets seen by inventory checker there is still a far higher chance to jump to Spawn1 state just because odds on the MoreSpawns states are set below 50% chance to jump.

 

The easiest fix for the MoreSpawns state to work properly is to Loop it rather than have it fall through into the Spawn1 state. The loop will force it to make a random jump.

 

On top of that issue, you basically need to test this in a custom test map with multiple SSG spawns or summon them by console to start trouble shooting the snag. Most maps only have 1 SSG spawn

 

1880360735_Screenshotfrom2024-05-1909-12-55.png.570c7fd150c511d25374cd684eb66cce.png

Edited by kalensar

Share this post


Link to post
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...