Jump to content
  • 0

My reloading function for my weapon is broken...


Melonpizza

Question

Hello (for some of you even again).

While i was working on my reload function, i had the idea of making an overlay-specific state so it shows how much ammo is left (for tactical reasons).

But accedently broke the function. When the third overlay (indirevammoused3) in the function was called, it would instead make a flicker effect (seemingly trying  to overlay it) and the go back to the previous overlay

(so the same with the other overlays that are not indirevammoused2 and 1).

i tried

  • (as you can then see) tried to delete previous overlays
  • tried to make them diffrent layered( every two because indirevammoused2 and 1 worked, and were on the same layer)

and prencisly checked for any TYPO's in the sprites

(i cant show footage, because my recording program wouldn't let me do that, and the wad is currently gzdoom only because i simply use gzdoom so no demos, but im planning after the version is 1.00 to make it compatable with other source ports)

heres the specific state:

fire:
 FRAV A 1 a_overlay(2,"indirevammoused1",false)
  FRAV A 0 a_checkforreload(2,"realfireFREV",false)
  FRAV A 0 a_clearoverlays(2,2,true)
  FRAV A 0 a_overlay(2,"indirevammoused2",false)
  FRAV A 0 a_checkforreload(4,"realfireFREV",false)
   FRAV A 0 a_clearoverlays(2,2,true)
  FRAV A 0 a_overlay(3,"indirevammoused3",false)
  FRAV A 0 a_checkforreload(6,"realfireFREV",false)
   FRAV A 0 a_clearoverlays(3,3,true)
  FRAV A 0 a_overlay(3,"indirevammoused4",false)
  FRAV A 0 a_checkforreload(8,"realfireFREV",false)
     FRAV A 0 a_clearoverlays(3,3,true)
  FRAV A 0 a_overlay(4,"indirevammoused5",false)
  FRAV A 0 a_checkforreload(10,"realfireFREV",false)
     FRAV A 0 a_clearoverlays(4,4,true)
  FRAV A 0 a_overlay(4,"indirevammoused6",false)
  FRAV A 0 a_checkforreload(12,"realfireFREV",false)
   FRAV A 0 a_clearoverlays(4,4,true)
    FRAV A 0 a_overlay(5,"indirevammoempty",false)
 FRAV A 0 a_jump(255,"reload")
 stop

Thanks

(also some little things here to answer)

(these are optional)

 

  1. how do i put text in a black box (because it looks neat)
  2. how do i make overlays not to bob with the weapon? would be neat for the sake of visibility
Edited by ebigautisticnerd

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

i don't know the answer to this but i may be able to point you in the right direction,  my first piece of advice is check the doom wiki, specifically sbarinfo https://zdoom.org/wiki/SBARINFO *NOTE THAT IT IS DEPRECIATED.

for anything that may be incomplete or missing, then download some mods like combined arms, hxrtc hud,  or brutal hexen to help you get the right idea of where you may be going wrong.

 

my theories:

1: id draw a picture and put the text in that, otherwise you will just have to use acs to display a hud message(https://zdoom.org/wiki/HudMessage) or something.

2: probably have to use a modifier in your weapons code (https://zdoom.org/wiki/A_WeaponReady) Specifically WRF_NOBOB

Hope this helps.

Share this post


Link to post
  • 0

1. i explained it a little bad, i meant in doomworld

2. well, that would solve the problem, but the weapon would also not bob too

3. SBARINFO is not for weapons, its for the Statusbar (Doom HUD)

 

all the three questions are were not answered, but at least you tried.

Share this post


Link to post
  • 0

To post text you want to display in a separate block, highlight the text and use the tags for quote or if it is code the code tags.

 

Have a look at Usage in A_WeaponReady, as Hitscanning_scumbag pointed out

 

You can record a demo with GZDoom. For someone to play back the demo, you just have to specify the specific version of GZDoom you used.

 

edit:

WildWeasel has a website with all kinds of help for making new DECORATE actors. Maybe you find the answers you seek there.

Edited by Kappes Buur

Share this post


Link to post
  • 0
20 hours ago, Kappes Buur said:

To post text you want to display in a separate block, highlight the text and use the tags for quote or if it is code the code tags.

 

Have a look at Usage in A_WeaponReady, as Hitscanning_scumbag pointed out

 

You can record a demo with GZDoom. For someone to play back the demo, you just have to specify the specific version of GZDoom you used.

 

edit:

WildWeasel has a website with all kinds of help for making new DECORATE actors. Maybe you find the answers you seek there.

 

1. Ah, Thanks

2. I already did

3. i will have a look at that

4. Ill take a look at this Website

 

Edit: the Website link from Nr.4 actually could help me, but it means that i have to redesign the weapon, sooooo the result will come later

Edited by ebigautisticnerd

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