Jump to content
  • 0

ZScript needs help with variables


noob_killer012345678

Question

I am making a sans in doom mod (dont ask me why) and im trying to make it so after X amount of attacks he goes into a sleep mode and cannot move or attack. How should i do this? ive been trying for a while and just cant seem to get it to work

Pastebin link to my code if you want to check it out: https://pastebin.com/H2dUymgr

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 1

A_Jump does not work like that inside functions. Either make the A_TiredCheck() function return a state, or use a SetStateLabel function to do state jump.

 

One more tip, is that if the actor gets pained while asleep, it wakes up (not sure if it is intended here).

And I think you have Sleep state defined twice, might cause problems (again not sure).

Share this post


Link to post
  • 1

To remove the paining, put

bNopain = true;

on start of the sleeping state, then put

bNopain = false;

when the sleeping ends.

Share this post


Link to post
  • 0
10 hours ago, jaeden said:

A_Jump does not work like that inside functions. Either make the A_TiredCheck() function return a state, or use a SetStateLabel function to do state jump.

 

One more tip, is that if the actor gets pained while asleep, it wakes up (not sure if it is intended here).

And I think you have Sleep state defined twice, might cause problems (again not sure).

Aight thanks. Is there a possible way to remove the abillity to get pained while in the sleep state? I do see now i have defined the sleep state twice as i forgot to remove the old one while rearranging the states

 

 

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