I need a custom missile,but i not fast as hell
- CaptainManiac
- Topic Author
- Cacodemon
Less
More
- Posts: 103
8 years 10 months ago #1
by CaptainManiac
I need a custom missile,but i not fast as hell was created by CaptainManiac
Hi i made the shotgun i mentioned before and made it fire custom missile type "FATSHOT".But it fires 3 missiles simulateansously and AS FAST AS HELL.I want to fire slowly,not fast
Please Log in or Create an account to join the conversation.
- Blue Shadow
- Administrator
Less
More
- Posts: 1129
8 years 10 months ago #2
by Blue Shadow
Replied by Blue Shadow on topic I need a custom missile,but i not fast as hell
Reminder: Do not make non-submission posts in the repository section. The workshop is a better place for that.
Please Log in or Create an account to join the conversation.
- MagicWazard
- Moderator
Less
More
- Posts: 808
8 years 10 months ago #3
by MagicWazard
Replied by MagicWazard on topic I need a custom missile,but i not fast as hell
By "fast", you mean the rate-of-fire is too high? Well, to know for sure, I think you'll need to post an example of your code, but I think I've got an idea what the problem is, especially since you mentioned getting 3 fireballs at once. See spoiler contents.
Don't be afraid to post an example if you have a specific question! If nothing else, it'll help you get your answer faster.
Warning: Spoiler!
Let's look at a theoretical example I just made up which probably looks similar to yours:
In this case, the number "2" represents how many "tics" long each animation frame lasts for. The value for a tic is about 1/35th of a second. The lower the number, the faster the effect happens. So adding more tics to the Fire state will slow it down. You can do this by adding extra animation frames that don't do anything except pad out the animation sequence, or making existing frames take longer. Also, in this case, the function "A_FireCustomMissile" is applied to EVERY animation frame on the line (F, G, and H), not just the last one. So you'll get three fireballs in rapid sequence from one attack function. If you only want to attack once, make sure that your attack function is only applied for one animation frame.
Here's an example of something that can fire a projectile once every 1/2 of a second, which is probably closer to what you want:
Code:
{
Fire:
HFSG FGH 2 A_FireCustomMissile("FatShot")
Goto Ready
}
In this case, the number "2" represents how many "tics" long each animation frame lasts for. The value for a tic is about 1/35th of a second. The lower the number, the faster the effect happens. So adding more tics to the Fire state will slow it down. You can do this by adding extra animation frames that don't do anything except pad out the animation sequence, or making existing frames take longer. Also, in this case, the function "A_FireCustomMissile" is applied to EVERY animation frame on the line (F, G, and H), not just the last one. So you'll get three fireballs in rapid sequence from one attack function. If you only want to attack once, make sure that your attack function is only applied for one animation frame.
Here's an example of something that can fire a projectile once every 1/2 of a second, which is probably closer to what you want:
Code:
{
Fire:
HFSG FG 2 //slight delay before shot
HFSG H 6 A_FireCustomMissile("FatShot")//only call the attack function for ONE frame, so ONE projectile is fired
HFSG GF 6//these just continue the animation to slow down the rate of fire
HFSG E 6 A_ReFire//'ReFire' means that this delay is skipped if "Fire" is still held down
Goto Ready
}
Don't be afraid to post an example if you have a specific question! If nothing else, it'll help you get your answer faster.
Please Log in or Create an account to join the conversation.
- CaptainManiac
- Topic Author
- Cacodemon
Less
More
- Posts: 103
8 years 10 months ago #4
by CaptainManiac
Replied by CaptainManiac on topic I need a custom missile,but i not fast as hell
It tells e Bad Numeric Constant. see the code:
Code:
ACTOR HellFireSG : Shotgun //2405
{
Tag "HellFire Shotgun"
+FLOORCLIP
+NOGRAVITY
+WEAPON.EXPLOSIVE
+Weapon.AMMO_OPTIONAL
+Weapon.DONTBOB
+WEAPON.NOAUTOAIM
Weapon.SelectionOrder 3000
Weapon.SlotNumber 3
//AttackSound "weapons/hfsgblast"
//Inventory.Pickupsound "misc/hfsgpickup"
Inventory.PickupMessage "You got the Hellfire shotgun.Liquidise with Hellfire!"
Obituary "%k was liquidised by HellFire Shotgun"
Scale 0.3
States
{
Spawn:
HFSG ABC 8 BRIGHT
Loop
Ready:
HFSG DE 2 A_JumpIfInventory("PowerStrength",1,"Powered")
Powered:
HFSG DE 2 A_WeaponReady
Loop
Select:
HFSG DE 2 A_Raise
loop
Deselest:
HFSG DE 2 A_Lower
loop
Fire:
HFSG FG 2
HFSG H 6 A_FireCustomMissile("FatShot")
HFSG DE 2
HFSG GF 6
HFSG E A_ReFire
goto Powered
}
}
Please Log in or Create an account to join the conversation.
- MagicWazard
- Moderator
Less
More
- Posts: 808
8 years 10 months ago #5
by MagicWazard
Replied by MagicWazard on topic I need a custom missile,but i not fast as hell
The line for A_ReFire is missing the number of tics it needs to display for. This needs to be filled in before A_ReFire.
Please Log in or Create an account to join the conversation.
- CaptainManiac
- Topic Author
- Cacodemon
Less
More
- Posts: 103
8 years 10 months ago - 8 years 10 months ago #6
by CaptainManiac
Replied by CaptainManiac on topic I need a custom missile,but i not fast as hell
Try this to kill a boss,it is still in beta,because it will use a custom 3d model projectile.Until it comes final,you will be hard to kill sometthing with it and hard to aim :oops:
https://drive.google.com/file/d/0B_Wvig29UmsBRTUwcVlGUjhUWlE/view?usp=sharing
https://drive.google.com/file/d/0B_Wvig29UmsBRTUwcVlGUjhUWlE/view?usp=sharing
Last edit: 8 years 10 months ago by CaptainManiac. Reason: I have not added the link
Please Log in or Create an account to join the conversation.