YesNoOk
avatar

Laser beam question (Read 3576 times)

Started by eishiba, June 15, 2019, 02:04:48 am
Share this topic:
Laser beam question
#1  June 15, 2019, 02:04:48 am
  • avatar
  • **
    • USA
So I'm trying to make a laser beam as a regular projectile. When it fires it comes out of my characters head and then plays the animation and then keeps on replaying the entire animation over and over. I dont have any loops in the animations. Also, I would like this laser to only hit once and not multiple times. How does one do this?

[Statedef 900]
type = S
movetype = A
physics = S
juggle = 4
poweradd = 30
ctrl = 0
velset = 0, 0
anim = 900
sprpriority = 1


[State 0, Projectile]
type = Projectile
trigger1 = animelem = 1
ProjID = 900
projanim = 950
projhitanim = 0
projscale = 1,1
projremove = 0
projremovetime = -1
velocity = 0,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projmisstime = 1
projpriority = 1
projsprpriority = 3
projedgebound = 40
projstagebound = 40
projheightbound = -240
offset = 13,-87
postype = p1         ;p2,front,back,left,right
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
;supermove = 0
;pausemove = 0
;(afterimage winmugen only)
;afterimage.time =
;afterimage.length =
;afterimage.palcolor =
;afterimage.palinvertall =
;afterimage.palbright = 0,0,0
;afterimage.palcontrast = 0,0,0
;afterimage.palpostbright =0,0,0
;afterimage.paladd =  0,0,0
;afterimage.palmul = 0,0,0
;afterimage.timegap =
;afterimage.framegap =
;afterimage.trans = ;none,add,add1,addalpha,sub
;ignorehitpause =
;persistent =
; HitDef
;attr = S,SP        ;SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
;hitflag = MAF        ;HLAFD+-
;guardflag = MA         ;HLA
;getpower = 0,0
;givepower = 0,0
;affectteam = E          ;B,E,F
;animtype = light          ;light,medium,hard,back,up,diagup
;air.animtype = light
;fall.animtype = Back
;priority = 4,Hit   ;Hit,Miss,Dodge
;damage = 0,0
;pausetime = 0,0
;guard.pausetime = 0,0
;sparkno = 0
;guard.sparkno = 0
;sparkxy = 0,0
;hitsound = 0,0
;guardsound = 0,0
;ground.type = High      ;Low,Trip,None
;air.type = High
;ground.slide = 0
;guard.slide = 0
;ground.slidetime = 0
;guard.slidetime = 0
;ground.hit = 0
;guard.hit = 0
;ground.hittime = 0
;guard.hittime = 0
;air.hittime = 20
;guard.ctrltime  = 0
;guard.dist = 320
;yaccel = 0.5
;ground.velocity = 0,0
;guard.velocity = 0
;air.velocity = 0,0
;airguard.velocity = 0,0
;ground.cornerpush.veloff = 0
;air.cornerpush.veloff = 0
;down.cornerpush.veloff = 0
;guard.cornerpush.veloff = 0
;airguard.cornerpush.veloff = 0
;airguard.ctrltime = 0
;air.juggle = 0
;mindist = 0,0
;maxdist = 0,0
;snap = 0,0
;sprpriority = 1
;p1sprpriority = 0;(winmugen only)
;p2sprpriority = 0;(winmugen only)
;p1facing = 0
;p1getp2facing = 0
;p2facing = 1
;p1stateno = 0
;p2stateno = 0
;p2getp1state = 1
;forcestand = 0
;fall = 0
;fall.xvelocity = 0
;fall.yvelocity = -4.5
;fall.recover = 1
;fall.recovertime = 4
;fall.damage = 0
;air.fall = 0
;down.velocity = 0,0
;down.hittime = 0
;down.bounce = 0
;id = 0
;chainID = -1
;nochainID = -1
;hitonce = 1
;kill = 1
;guard.kill = 1
;fall.kill = 1
;numhits = 1
;palfx.time = 0
;palfx.mul = 0,0,0
;palfx.add = 0,0,0
;envshake.time = 0,0
;envshake.freq = 0
;envshake.ampl = 0
;envshake.phase = 0
;fall.envshake.time = 0,0
;fall.envshake.freq = 0
;fall.envshake.ampl = 0
;fall.envshake.phase = 0
;ignorehitpause =
;persistent =

[State 900, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
Re: Laser beam question
#2  June 15, 2019, 02:16:22 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 Use a helper. Inside the helper, use a projectile sctrl that constantly gets removed and respawned as long as the helper exists, and inside the same helper you can use an explod for the beam graphic that gets removed whenever the helper ends or the root gets hit. The projectile stcrl must be an invisible animation with a red CLN, hence making the beam graphic an explod inside the helper. The plus side is that the method I suggested will make it so the projectile cannot be nullified by anti-projectiles (i.e.: reflectors).
Re: Laser beam question
#3  June 15, 2019, 02:21:40 am
  • avatar
  • **
    • USA
I have not learned to use a helper. Where can i go to read up on this helper? Also I should note that the laser has red hit boxes but does not connect with the opponent.
Re: Laser beam question
#4  June 15, 2019, 02:23:47 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 You could probably take a look at my Hieda no Akyuu since she uses the exact technique that I suggested in order to keep her beam from being reflected. The beam attack she uses in question is called "Miare Cannon," which calls a helper within the state.
Re: Laser beam question
#5  June 15, 2019, 05:42:17 am
  • avatar
  • **
    • USA
After some thought about reflectors such as Motaro from Mortal Kombat, maybe I should post a quick video so someone can take a look and tell me if this helper is still what I need It not even 50 seconds long. I did download your character and looked at the helper. The video is down below.

https://www.youtube.com/watch?v=sfg9rGT8hDI&feature=youtu.be
Re: Laser beam question
#6  June 15, 2019, 06:09:59 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 The helper should destroyself after a certain amount of time so that the beam can stop firing. How much time you want until the helper ends is up to you.
Re: Laser beam question
#7  June 15, 2019, 06:36:36 am
  • avatar
  • **
    • USA
For your helper you have

[State 3200, Super BG]
type = helper
trigger1 = animelem = 1
helpertype = normal
stateno = 6900
ID = 6900
name = "BG"
posttype = Back
supermovetime = 99999
pausemovetime = 99999
ownpal = 1
ignorehitpause = 1
size.xScale = 5
size. yScale = 5

I'm a nood so I'm gonna ask noob questions.
Which of these controls the time that the helper helps?
Also, what does what other helpertypes are there?
What does ownpal and ignorehitpause do?
Re: Laser beam question
#8  June 15, 2019, 08:04:44 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 Technically, helper type isn't supported in MUGEN 1.0 and upward, that's just left over stuff since I rely on double clicking the sctrl menu to automatically make a sctrl template for me as opposed to typing them out, so, that part can be ignored.

 ownpal makes it so that the helper or explod doesn't inherit the player's palette (so, those fancy pal fx like the player glowing orange when burned won't make the helper or explod also turn orange). Ignorehitpause means the sctrl will not wait for a hitdef's pausetime to finish and do its own thing. Also, you actually need to define the destroyself in a state that the helper calls from if you've noticed the "stateno" parameter from the helper sctrl.
Re: Laser beam question
#9  June 15, 2019, 11:22:38 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Projectile is fine. You have projremove = 0. This means never remove the projectile. You also have projremovtime = -1 which means to remain indefinitely. Change them to 1 and the length of the anim for the removal time.

You hve projhits = 1 so it should only hit the once.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Laser beam question
#10  June 15, 2019, 06:39:48 pm
  • avatar
  • **
    • USA
Projectile is fine. You have projremove = 0. This means never remove the projectile. You also have projremovtime = -1 which means to remain indefinitely. Change them to 1 and the length of the anim for the removal time.

You hve projhits = 1 so it should only hit the once.

I thuoght maybe those were issues but when I change the projremovetime to any other number when I try the attack, during the very first frame of animation, a second version of my character in its regular standing state appears above the regular character and then disappears and the projectile doesnt come out but the animation for projecting it does happen.
Re: Laser beam question
#11  June 15, 2019, 07:06:41 pm
  • *
  • "The Ultimate Reploid"
Quote
projhitanim = 0
This line is causing the clone to appear, change it to your projhit anim (or change it to -1, if you don't have any projhit anim).
Last Edit: June 15, 2019, 07:30:20 pm by The Omega Safeer
Re: Laser beam question
#12  June 15, 2019, 08:26:31 pm
  • avatar
  • **
    • USA
Quote
projhitanim = 0
This line is causing the clone to appear, change it to your projhit anim (or change it to -1, if you don't have any projhit anim).

Changing it to -1 took the clone away but still caused the projectile to not come out but i tried -2 and this cause the laser to come out properly and disappear. The opponent didnt get hit though.

This is kind of off topic but Im also having an issue where I save my character and close it and come back later and some of the sprites animations are gone. But I will save every single category like commands sprites and animations and they are still vanishing and I have to re add them.
Last Edit: June 15, 2019, 08:55:04 pm by eishiba
Re: Laser beam question
#13  June 15, 2019, 11:57:19 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Ff has a save all function. You should use that. If you started with the "elecbyte template" please delete the template and never use it again.

For the projectile to hit it needs red clsn boxes. And you need to fill out the attr field.

Attr = S, SP

You should remove the comments on any of the hitdef fields you want to use. Damage Attr and hitflags will be important


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Laser beam question
#14  June 16, 2019, 03:34:26 am
  • avatar
  • **
    • USA
So I got the laser to work and it hits. But Im still having trouble with my work getting erased.  Even when I save all. My moves all still work, but the sprites for my laser and a couple other special attacks are gone and I have to re add them. Do I need a seperate cns?
Re: Laser beam question
#15  June 16, 2019, 07:58:44 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Did you start with the elecbyte template y/n?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Laser beam question
#16  June 16, 2019, 08:50:22 am
  • ***
  • Non est hoc propter hoc sed propter est hoc
    • USA
    • doubletrend-zeta.neocities.org/
for what it's worth, if he's using ffstudio there is no elecbyte template, only Winane AI.
Re: Laser beam question
#17  June 16, 2019, 06:14:48 pm
  • avatar
  • **
    • USA
Re: Laser beam question
#18  June 17, 2019, 12:19:56 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Ok. Some many moons ago when i still did stuff ff had save which was the file you were on. And save all which was to save everything. I don't know if the version you're using acts the same but given the air is retained but the sprites go missing maybe you are only saving the air file when you hit that button. You are on the air file at the time...

Backup iirc was always bleh. Never used it except by accident.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Laser beam question
#19  June 17, 2019, 05:19:06 pm
  • avatar
  • **
    • USA
Thats not working either. Whats peoples thoughts on fighter factory ultimate? I downloaded that and it looks like all ill have to add is ALL of my sprites but if it saves everything it might be worth it. My old version was the virtual tek version.
Re: Laser beam question
#20  June 17, 2019, 06:13:59 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Thats not working either. Whats peoples thoughts on fighter factory ultimate? I downloaded that and it looks like all ill have to add is ALL of my sprites but if it saves everything it might be worth it. My old version was the virtual tek version.

Don't let the name fool you.  What you want is FF3 Studio.

Ignore FF Ultimate