Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

STOOPMAN

Members
  • Content count

    24
  • Joined

  • Last visited

Posts posted by STOOPMAN


  1. 7 hours ago, boris said:

    Looks like you're trying to include a DECORATE file from ZScript. That doesn't work. Instead create a "decorate" file (with any extension) in the base directory and include your file from there.

    I removed the decorate file from the zscript file and it worked! thanks man

    before:

    image.png.b8208a33095c1818793744c9c51cd179.png

    after:

    image.png.8b051cdbba9e395c6f87bd2d9a264567.png


  2. recently ive been working on a tactical-ish doom mod, with it im was making a tokens text file so when you start up the game it plays an animation, but every time I try to boot it up it just says this:

    image.png.494a970cd40e6460fe73dc8684a8c35f.png

    I really dont get what im missing within the file, as examples ive seen only have tokens in the file and nothing else

    also heres what the file looks like:

    image.png.5c0d006110b93cd0bc762f468f5dcd88.png

    Help would be appreciated


  3. 1 hour ago, MFG38 said:

    It's actually pretty simple to do - all you need to do is add a call to the A_GiveInventory function in the weapon's Ready state and have the item it gives be the ammo that the weapon uses.

     

    41 minutes ago, STOOPMAN said:

    I added it to my code, and it slightly worked.

    the ammo counter did go up when the weapon was in its ready state but the weapon started out with 0 ammo (which I want it to start out with 100)

    and when walking/running the weapon is static since its looping the A_GiveInventory line. I also wanted to code the weapon in a way to where the recharge can be interrupted (kinda like the laser pistol in space cats saga)

    I managed to fix the ammo counter starting at 0, but I still have a problem with the charge up not being able to be interrupted

    (I also found out that the weapon can still fire with 0 ammo which needs to be fixed)


  4. 25 minutes ago, MFG38 said:

    It's actually pretty simple to do - all you need to do is add a call to the A_GiveInventory function in the weapon's Ready state and have the item it gives be the ammo that the weapon uses.

    I added it to my code, and it slightly worked.

    the ammo counter did go up when the weapon was in its ready state but the weapon started out with 0 ammo (which I want it to start out with 100)

    and when walking/running the weapon is static since its looping the A_GiveInventory line. I also wanted to code the weapon in a way to where the recharge can be interrupted (kinda like the laser pistol in space cats saga)


  5. for a good amount of time now Ive been working on a joke mod. One of the weapons (which is a cat that behaves like a chainsaw and has an alt fire that shoots a laser) I plan to have an ammo meter, which recharges when your not firing the weapon, But im very confused on how to code it. Im currently trying to base the code off of the laser pistol from space cats saga, yet my brain keeps getting jumbled up in the code. Help is appreciated!


  6. 28 minutes ago, SMG_Man said:

    so take what I'm suggesting with a grain of salt; this is how I would do it, not necessarily the only (or even the best) way to handle it.

     

    With what you're describing up there, you probably need to have a separate ammo from bullets that your weapon actually fires (which will be the number shown on the left side in the default status bar). Using some form of number-checking code, when reloading the gun would check how much ammo is left in the magazine (if any), then take however many "Bullets" are needed in order to put the magazine back up to 30 ammo. E.g., if the magazine is empty, it will take away 30 bullets and give you 30 mac-10 ammo; if the magazine has 8 rounds left, it will take away 22 bullets and give you 22 more mac-10 ammo for the magazine. I would offer an actual example of this, but I'm not that good at writing DECORATE code without referencing other stuff.

     

    Which leads into my next point - like Act mentioned, it's a good idea to check out how others do similar stuff. Either go through the Brutal doom package, or maybe find a weapon on Realm667 that already functions like this and see how it handles reloading.

    stupid question but should I use Zscript or decorate for my weapons, after searching around it seems that Zscript is more compatible with reloads


  7. 7 minutes ago, act said:

    I don't really see anything wrong with that? It's working as it should. It fires 30 shots, reloads, and fires 30 more before reloading again.

    Anyways, the big fat watermark on your vid tells me you haven't heard of FOSS alternatives. You should look into using OBS and Shotcut for recording gameplay and editing respectively.

    I want the ammo counter to stay at 30, and once it reaches zero, it plays the reload anim/sound and takes 30 ammo. so it creates the illusion of reloading kinda how brutal doom does it


  8. 40 minutes ago, act said:

    sure, why not. Use YouTube or something instead of uploading it here because of the 50MB limit.

    press 5 on your keyboard, thats where I fire the mac10 and you should see the problem with the ammo count


  9. 1 minute ago, act said:

    I genuinely don't understand what you're trying to say. It makes no sense how the clips would increase the magazine counting item, especially when it's hard capped to 30. Not to mention how you'd measure it.

    can I send you a recording on the weapon in use to give you a better Idea


  10. 18 minutes ago, act said:

    Well just as a by the way, I should tell you that this whole reloading thing has nothing to do with the actual ammunition or firing lmao, we're just creating a jerryrigged counter to make the game count how many bullets are fired.

    Now in your code, the RELOAD state - which is what is executed when you press your reload key - has MA10 A 1 as its only frame. So what that means is that it uses the sprite MA10A0 in your .WAD/.PK3/Whatever for 1 tic. That's what the number means at the end; it's the amount of tics the sprite MA10A0 is rendered for. A tic is 1/35th of a second, so you're telling the game to do the entire reloading thing for 1/35th of a second. If you want to create an animation, use the Offset feature in Decorate.

    And once again, you need to create one of these frames after you fire a bullet in order to tell the game you "expended one round from your magazine". That means put MA10 A 0 A_GiveInventory("Mac10Loaded", 1) after you fire the bullet. This tells the game to give the player 1 item that counts as an expended round in your magazine.

    While I was waiting for a response, I tinkered the code around a bit and managed to make the mac10 preform the animation after it fires 30 bullets, all I need to do now is to jerryrig the counter, but im having problems with that too. whenever I pick up ammo (in this case clips) it goes both to the ammo counter and the backpack counter, so instead of the ammo counter staying at a maximum of 30, it will go beyond that.
    help is appreciated (P.S. sorry for my lack of knowledge, but I thank you for teaching me and helping me get this far, thanks! :} ) image.png.586db9472bc982f110739f3bd7696daf.png also heres my code


  11. 1 hour ago, act said:

    Well firstly, the A_JumpIfInventory in the FIRE state should be before everything else. You can use the sprite TNT1 A 0 which acts as a "null" sprite which instantaneously performs any actions relating to it. Secondly, in the A_JumpIfInventory action, you should put the magazine size - which I assume to be 30 - where the "0" is. This will "jump" to the RELOAD state after 30 shots have been fired.

    Alright I changed the code a bit, but the problem is that whenever I press the reload key all it does is change the frame (keep in mind that I also added and entirely different ammo group for the mac10, which I may convert back)

    btw heres my current code, help is always appreciated
    image.png.b4dc54a4ebe0f477f8bb28a82f92bcd7.png


  12. 10 hours ago, act said:

    I'm a bit unskilled at Decorate coding myself, so take my advice with a grain of salt.

    So, the first thing we need to do is "flag" the weapons READY state as re-loadable. So, on the sprite underneath Ready: (The sprite is MA10 F 1, in this case.) you need to put (WRF_ALLOWRELOAD). This will make it where, upon the "reload" key being pressed, the weapon will go to the RELOAD state.

    The next thing you'll have to do is make a RELOAD state. It's exactly the same thing as making a FIRE state, except instead of shooting, you reload. However, to actually make the game count magazines, you'll need to create a Custom Inventory item. I stole this from the ZDoom CustomInventory page, and adapted it to work for you:

    
    actor Mac10Mag : CustomInventory
    {
      Inventory.MaxAmount <Magazine Size in an integer>
    }

    It should be pretty self explanatory. Now, what you next need to do is create two frames in your FIRE state. One will use A_JumpIfInventory before you fire the bullets, so if it tries to fire and the magazine is "empty", it'll switch to reload. For your use, it would be A_JumpIfInventory("Mac10Mag", <Magazine Size>, "RELOAD"). This would make it jump to the RELOAD state when a certain amount of bullets are fired. The second frame will be after you fire the bullets, which would be A_GiveInventory("Mac10Mag", 1), which works as essentially ticking one spent round from your magazine.

    Then, in your RELOAD state, have a frame use A_TakeInventory("Mac10Mag", <Mag Size>). This will "reload" the in-game counter for spent bullets.

    still pretty confused on what to do with this code, ive added it in and im able to do something with the reload button, only problem is that it still takes ammo directly from the inventory and it only makes a sound when I press R

    help is appreciated

    image.png


  13. Hey Burg, while I was waiting for a reply I was tweaking the code and managed to get it working, only problem is that when I switch to a different weapon, I can't switch back to the Mac 10, help is appericiated (also heres the tweaked code)
    image.png.56b5dab7b55d77f59a64d7c8d9e1ca2a.png


  14. For some time ive been thinking of making a mod for doom that adds various weapons, enemies, powerups, and even some weapon customization. But since I barely know anything of coding and the only way im coding now is by using a guide, I need some help with it. Im trying to make a mac 10 that can be reloaded, but I am not sure if Im doing it correctly. I may not respond immediatly (I may be doing something else) but any coding help is greatly appreciated (also heres the code I have so far)unknown.png

×