elend Posted January 8, 2019 You could decrease the "snap onto" distance as well, I think. But yeah, it can be annoying. Just have your left hand near the ESC key. :p 0 Share this post Link to post
Aquila Chrysaetos Posted January 8, 2019 When I want to draw lines (in general, but primarily on linedefs), I just press ctrl+D and draw away and I never have to deal with the hassle. This puts you in line drawing mode, so you won't have to worry about that happening. 2 Share this post Link to post
Jaska Posted January 8, 2019 I just press insert. It starts the drawing too. 2 Share this post Link to post
KVELLER Posted January 8, 2019 5 hours ago, Aquila Chrysaetos said: When I want to draw lines (in general, but primarily on linedefs), I just press ctrl+D and draw away and I never have to deal with the hassle. This puts you in line drawing mode, so you won't have to worry about that happening. 2 hours ago, Jaska said: I just press insert. It starts the drawing too. Thank you! That's really handy. 1 Share this post Link to post
KVELLER Posted January 8, 2019 Aaaand I have another problem :P (although unrelated). I'm messing with ACS and wrote this: Script "RandomFireball" (void) { int ChooseSpawn = Random(1, 4) if(ChooseSpawn = 1) { Thing_ProjectileAimed(3, T_IMPFIREBALL, 10, 1); } else if(ChooseSpawn = 2) { Thing_ProjectileAimed(4, T_IMPFIREBALL, 10, 1); } else if(ChooseSpawn = 3) { Thing_ProjectileAimed(5, T_IMPFIREBALL, 10, 1); } else Thing_ProjectileAimed(6, T_IMPFIREBALL, 10, 1); } GZDoom Builder is complaining that there's an error in the "if(ChooseSpawn = 1) {" line. I'm assuming that I messed something up, which isn't a surprise considering I pretty much slapped this together with information I found on different parts of the wiki (I had like 10 tabs in my browser lol). The question is, what am I doing wrong? 0 Share this post Link to post
Aquila Chrysaetos Posted January 8, 2019 int ChooseSpawn = Random(1, 4); Missing semicolon at the end of your int line. 1 Share this post Link to post
Edward850 Posted January 8, 2019 Use == when comparing values. = is for setting values. 1 Share this post Link to post
KVELLER Posted January 8, 2019 (edited) 1 hour ago, Aquila Chrysaetos said: int ChooseSpawn = Random(1, 4); Missing semicolon at the end of your int line. Same error. @Edward850 Ohhh, I get it. EDIT: Ugh, Now I've got another error... I'll try to figure this out and come back if I can't. 0 Share this post Link to post
Empyre Posted January 8, 2019 What Edward said, plus, instead of nested if/else statements, you could use a switch/case statement. 1 Share this post Link to post
Gez Posted January 8, 2019 (edited) Heck, you could do this: Script "RandomFireball" (void) { int ChooseSpawn = Random(3, 6); Thing_ProjectileAimed(ChooseSpawn, T_IMPFIREBALL, 10, 1); } Or even: Script "RandomFireball" (void) { Thing_ProjectileAimed(Random(3, 6), T_IMPFIREBALL, 10, 1); } 3 Share this post Link to post
KVELLER Posted January 8, 2019 1 hour ago, Gez said: Heck, you could do this: Script "RandomFireball" (void) { int ChooseSpawn = Random(3, 6); Thing_ProjectileAimed(ChooseSpawn, T_IMPFIREBALL, 10, 1); } Or even: Script "RandomFireball" (void) { Thing_ProjectileAimed(Random(3, 6), T_IMPFIREBALL, 10, 1); } Damn, what a way to simplify what I wrote haha! 0 Share this post Link to post
KVELLER Posted January 8, 2019 Uh... I'm not a fan of asking so many questions but I have another issue. I can't get Thing_ProjectileAimed to work properly. The fireball spawns just fine, but it just sits there without doing a thing. I did make sure that the player (which is supposed to be the target) gets a TID of 1 at the start of the map, in fact I even have other scripts that rely on that and they're working perfectly fine. 0 Share this post Link to post
Gez Posted January 8, 2019 Is it not moving at all, or just moving slowly? With a speed of 10 it should cover less than 44 map units per second, which is a bit slow. To get the actual speed of an imp ball thrown by an imp, you should use a speed of 80. https://zdoom.org/wiki/Thing_ProjectileAimed Quote speed: Speed of the projectile in units per 8 tics Whereas the speed property of a projectile is in units per tic. https://zdoom.org/wiki/Actor_properties#Speed 0 Share this post Link to post
Bauul Posted January 8, 2019 2 hours ago, KVELLER said: Thing_ProjectileAimed(3, T_IMPFIREBALL, 10, 1); If I'm reading this right, isn't this spawning an imp fireball at byte-angle of "10" and a speed of "1"? That's not going to go anywhere very quickly! It's also not going to aim at the player at all. 0 Share this post Link to post
Edward850 Posted January 8, 2019 (edited) 2 minutes ago, Bauul said: If I'm reading this right, isn't this spawning an imp fireball at byte-angle of "10" and a speed of "1"? That's not going to go anywhere very quickly! It's also not going to aim at the player at all. No. It's spawning at speed 10 targeting an object with TID 1. 1 Share this post Link to post
KVELLER Posted January 8, 2019 2 hours ago, Gez said: Is it not moving at all, or just moving slowly? With a speed of 10 it should cover less than 44 map units per second, which is a bit slow. To get the actual speed of an imp ball thrown by an imp, you should use a speed of 80. https://zdoom.org/wiki/Thing_ProjectileAimed Whereas the speed property of a projectile is in units per tic. https://zdoom.org/wiki/Actor_properties#Speed Oh, alright. But no, it doesn't move at all. I changed it to 100 earlier to make sure the speed wasn't the issue, but it still wasn't moving. I also tried placing an enemy with another TID and have the fireball target it, and it didn't work either. BTW, I'm using a dummy DECORATE actor as the spawn point. Could that be causing problems in any way? 0 Share this post Link to post
Gez Posted January 8, 2019 20 minutes ago, KVELLER said: BTW, I'm using a dummy DECORATE actor as the spawn point. Could that be causing problems in any way? Potentially. Try using something like a teleport landing or a map spot. 0 Share this post Link to post
KVELLER Posted January 8, 2019 1 hour ago, Gez said: Potentially. Try using something like a teleport landing or a map spot. It's still the same. However, I downloaded an older version of GZDoom and guess what? It works. It looks like they broke it in one of the updates, so I'm going to report it. 0 Share this post Link to post
Bauul Posted January 9, 2019 5 hours ago, Edward850 said: No. It's spawning at speed 10 targeting an object with TID 1. You're absolutely right, I was looking at the wiki page for Thing_Projectile by accident. 0 Share this post Link to post
AJOgames Posted January 9, 2019 I have run into what is probably the most annoying issue when it comes to making weapons that shoot projectiles, (not hitscan.) You see I created a new weapon called the RapidRocket, it's a rocket launcher that shoots at a very fast rate, but at the expense of needing to be reloaded,. the total ammo count for the weapon is 100, but the amount of rockets that can be fired before reloading is 50. Now this is the first weapon I ever tried to implement reloading to, so of course I probably made some mistakes along the way... So what's the issue I have? Well When I open GZDoom to test the weapon, it loads just fine, but when I select the weapon and then press the fire button, GZDoom completely freezes, then crashes. And I seriously wish I knew the reason why, but I don't, neither GZDoom builder nor Slade will tell me if there's any issues with the coding of my weapon, If you want to take a look at the DECORATE code, here you go. _________RapidRocket(Decorate)____________________ ACTOR RapidRocket : Weapon 6656 { inventory.pickupsound "weaponpickup" Inventory.PickupMessage "You got the Sawedoff!" Weapon.AmmoType "MRLRocket" Weapon.AmmoGive 25 Weapon.AmmoUse 1 States { Spawn: W1PU A -1 Loop Ready: DEVG A 1 A_WeaponReady Loop Deselect: DEVG A 1 A_Lower DEVG AA 0 A_LOWER Loop Select: DEVG A 1 A_Raise DEVG AA 0 A_RAISE Loop fire: DEVG B 1 A_Playsound ("TRR/Fire") DEVG B 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG C 1 Bright DEVG C 1 A_TakeInventory("WildRocketOnecheck",1) DEVG D 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 1 DEVG F 1 A_Playsound ("TRR/Fire") DEVG F 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG G 1 Bright DEVG G 1 A_TakeInventory("WildRocketOnecheck",1) DEVG H 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 1 DEVG J 1 A_Playsound ("TRR/Fire") DEVG J 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG K 1 Bright DEVG K 1 A_TakeInventory("WildRocketOnecheck",1) DEVG L 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 0 A_Refire goto see AltFire: DEVG A 0 A_JumpIfInventory("WildRocketOnecheck",2,"MustReload") DEVG A 0 A_JumpIfInventory("WildRocketOnecheck",1,"MustReload2") DEVG B 1 A_Playsound ("TRR/Fire") DEVG B 0 A_TakeInventory("WildRocketOnecheck",1) DEVG B 0 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG C 0 DEVG F 0 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG G 0 DEVG J 0 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG K 0 DEVG DHL 1 DEVR ABCD 2 DEVR CBA 1 DEVG L 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 0 A_Refire goto see Reload: DEVG A 1 DEVG A 0 A_Playsound ("TRR/Reload1") DEVR ABCDEF 4 DEVR F 0 A_GiveInventory("WildRocketOnecheck",50) DEVR EDE 3 DEVR E 0 A_Playsound ("TRR/Reload2") DEVR F 2 DEVR EDCBA 3 DEVG A 1 Stop } } actor WildRocketOnecheck : puzzleitem { inventory.maxamount 50 } actor WildRocketOne { Radius 10 Height 10 Speed 40 Damage 30 RenderStyle Add Alpha 0.75 Scale 0.50 SeeSound "TRR" DeathSound "TRR/rkt/explode" PROJECTILE ExplosionDamage 32 ExplosionRadius 32 +SEEKERMISSILE +RANDOMIZE States { Spawn: HMMS AA 0 Bright A_BishopMissileWeave HMMS BB 0 Bright A_BishopMissileWeave Loop Death: WRX2 A 0 A_Explode WRX2 ABCDEFGHIJKLMN 2 Bright Stop } } 0 Share this post Link to post
Gaia74 Posted January 9, 2019 1 hour ago, AJOgames said: fire: DEVG B 1 A_Playsound ("TRR/Fire") DEVG B 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG C 1 Bright DEVG C 1 A_TakeInventory("WildRocketOnecheck",1) DEVG D 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 1 DEVG F 1 A_Playsound ("TRR/Fire") DEVG F 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG G 1 Bright DEVG G 1 A_TakeInventory("WildRocketOnecheck",1) DEVG H 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 1 DEVG J 1 A_Playsound ("TRR/Fire") DEVG J 1 A_FireCustomMissile("WildRocketOne", random(-1, 1), TRUE, 5, 3 + random(-1, 1)) DEVG K 1 Bright DEVG K 1 A_TakeInventory("WildRocketOnecheck",1) DEVG L 1 A_JumpIfInventory("WildRocketOnecheck",0,"Reload") DEVG A 0 A_Refire goto see Deselect: DEVG A 1 A_Lower DEVG AA 0 A_LOWER Loop Select: DEVG A 1 A_Raise DEVG AA 0 A_RAISE Loop i see 2 errors why goto See?, is goto ready xD and why repeat 3 times a_lower and a_raise? only use one 0 Share this post Link to post
AJOgames Posted January 9, 2019 Ohhh, didn't notice that, don't know why I used "goto see", I'll fix this, Thank you for helping, @Gaia74! 0 Share this post Link to post
AJOgames Posted January 9, 2019 It still crashes, but at least the two prior mistakes were fixed. 0 Share this post Link to post
Gaia74 Posted January 9, 2019 15 minutes ago, AJOgames said: It still crashes, but at least the two prior mistakes were fixed. Does not he tell you something wrong when he crashes? I have a code to make reload a weapon, but I'm curious to see why it's crashing xD 0 Share this post Link to post
AJOgames Posted January 9, 2019 it doesn't tell me, unfortunately, GZDoom freezes when I try to fire the weapon. 0 Share this post Link to post
Gaia74 Posted January 9, 2019 1 minute ago, AJOgames said: it doesn't tell me, unfortunately, GZDoom freezes when I try to fire the weapon. https://zdoom.org/wiki/A_BishopMissileWeave is deprecated, change to normal rocket to see if can work now 0 Share this post Link to post
AJOgames Posted January 9, 2019 And it still crashes, I did however, do a little test, and when the game started, I pulled up the console command and typed in "summon WildRocketOne" and as soon as I hit the "`" button (which activates the console) and GZDoom again crashed, so I think it has to do with Actor WildRocketOne, (the projectile the weapons shoots out,)rather than the weapon itself. 0 Share this post Link to post
KVELLER Posted January 9, 2019 3 hours ago, AJOgames said: Spawn: HMMS AA 0 Bright A_BishopMissileWeave HMMS BB 0 Bright A_BishopMissileWeave Loop Here's your problem. You're telling the game to do an infinite amount of things at the same time. That ain't gonna work. The state needs to be at least 1 tic long. 0 Share this post Link to post
AJOgames Posted January 9, 2019 Yeah, I started to think it was something like that was what was causing the problem, Thank you for your help! 1 Share this post Link to post
AJOgames Posted January 9, 2019 Well, the game doesn't crash anymore, and everything seems to be working fine, except the reload function, the weapon doesn't go to the reload action after 50 shots Like I want it to, but like I said before, being the first weapon I created (code-wise) to have reloading, I probably made some mistakes trying to code it in, most likely with the "A_JumpifInventory", "A_TakeInventory", and "A_GiveInventory" actions. I'm happy that there isn't any freezing or crashing now. :) 0 Share this post Link to post