Jump to content
  • 0

Function for changing depending on what's in the player's inventory at start?


colBoh

Question

Doing some coding. I know that A_JumpIfInTargetInventory changes depending on whether the target has a specific item in their inventory, i.e. a player having a backpack or a BFG. Is there any way to check the player's inventory at the start of a level?

 

What I want to try to do is make a mod that replaces existing enemies with slightly different ones, i.e. a ZombieMan with a ShotgunGuy. I want the enemies to get stronger and strong in later levels. Any idea how, or IF I can code that?

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0
21 minutes ago, colBoh said:

Doing some coding. I know that A_JumpIfInTargetInventory changes depending on whether the target has a specific item in their inventory, i.e. a player having a backpack or a BFG. Is there any way to check the player's inventory at the start of a level?

 

What I want to try to do is make a mod that replaces existing enemies with slightly different ones, i.e. a ZombieMan with a ShotgunGuy. I want the enemies to get stronger and strong in later levels. Any idea how, or IF I can code that?

I guess you could do an OPEN script in ACS that checks for each item, but I don't know if there's a replace function.

 

Maybe you could put in the Spawn state of each monster a way to check the return value of the ACS script and, based on it, removing the monster and spawning a new one with A_SpawnItemEx?

Share this post


Link to post

Join the conversation

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

Guest
Answer this question...

×   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...