|
Post by datdude12399 on Sept 15, 2024 11:46:30 GMT -5
helo everyone, i have a few questions regarding making weapons in DECORATE
1: how to make casings follow the camera vertically? i'm using A_SpawnItemEx for spawning casings when the weapon fires, and when i test it out in game, the casings spawn in a single, already defined spot and don't follow the camera's pitch, so how do i make it follow the camera's vertical aim (i.e. the camera's pitch)?
code i'm using: A_SpawnItemEx("BulletCasing", 40, 0, 25, random(4,6), random(7,8), random(3,5), 0, SXF_TRANSFERPITCH)
2: how to make reloading weapons with altfires? in my weapon mod i want the pistol to have a faster primary fire and a slower but more accurate altfire. now this would be easy if the pistol didn't need to be reloaded, but it has to be reloaded, so i dunno the solution, since i'm using A_JumpIfNoAmmo everytime the weapon fires, and having AmmoType1 be the Pistol's mag and having AmmoType2 be Clips, and i can't use A_JumpIfInventory("PistolAmmo", 0, "Reload") because that means that it will jump when the Pistol's mag is full, not empty.
thanks in advance for help!
|
|
|
Post by ketmar on Sept 15, 2024 13:43:20 GMT -5
1. you need to properly set z offset and z velocity. see zdoom wiki for example (at "SXF_TRANSFERPITCH" flag). 2. first. "Note that if amount is 0, the jump is only performed if the actor is carrying the maximum number of that item." so you have to use 1 there. second. something like this: A_JumpIfInventory("PistolAmmo", 1, "FireIt") Goto Reload i.e. invert your condition — you jump to firing state if the player has some ammo left, and if they aren't, "goto" will go to reloading state.
|
|
|
Post by datdude12399 on Nov 15, 2024 8:34:51 GMT -5
1. you need to properly set z offset and z velocity. see zdoom wiki for example (at "SXF_TRANSFERPITCH" flag). 2. first. "Note that if amount is 0, the jump is only performed if the actor is carrying the maximum number of that item." so you have to use 1 there. second. something like this: A_JumpIfInventory("PistolAmmo", 1, "FireIt") Goto Reload i.e. invert your condition — you jump to firing state if the player has some ammo left, and if they aren't, "goto" will go to reloading state. thank you very much for the help! i also ran into another problem when making a Chainsaw for my mod, it's supposed to play a looping sound when it's in the "ActuallyReady" state, but it plays the idle sound once, then stops even though i set it to loop???? i can't even play the sound in the console! what am i doing wrong?????? i am genuinely SO confused because it was working completely fine until it just didn't. code:
Ready: SAWZ A 1 A_PlaySound("chainsaw/zip", CHAN_6) SAWZ BCD 2 SAWZ E 3 A_PlaySound("chainsaw/ready", CHAN_5) SAWZ DCBA 2 Goto ActuallyReady ActuallyReady: TNT1 A 0 TNT1 A 0 A_PlaySound("chainsaw/idle", CHAN_6, 1.0, true) SAWG ABCDEF 2 A_WeaponReady Loop
|
|
|
Post by ketmar on Nov 15, 2024 16:49:18 GMT -5
that's where you have to wait for someone other to help. i simply don't know. sorry. ;-)
|
|