collapse

Author Topic: Something just don't want to get spawned  (Read 1874 times)

0 Members and 1 Guest are viewing this topic.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Something just don't want to get spawned
« on: May 21, 2013, 03:08:13 AM »
Hello again,
I have run into a new problem:
Code: [Select]
; Orreries Universe Orb
[Statedef 4220]
movetype = A
physics = N
ctrl = 0
anim = 1998
velset = 0,0
sprpriority = 1

[State 2105]
type = AngleDraw
trigger1 = 1
scale = 0.75,0.75
ignorehitpause = 1

;[State 1010, VA]
;type = varadd
;trigger1 = time || ((time = 0)&&(var(40) > 0))
;var(40) = 1

[State 1010, NHB]
type = nothitby
trigger1 = 1
time = -1
value = ,AA,AT
ignorehitpause = 1

[State 1010, CA]
type = changeanim
trigger1 = time = 0
value = 3102+1*ishelper(3103)+2*ishelper(3104)+3*ishelper(3105)+4*ishelper(3106)+5*ishelper(3107)

[State 1001, AFI]
Type = AfterImage
Trigger1 = var(1) = 0
Trans = Add
Time = -1;2
Length = 8
TimeGap = 3
FrameGap = 1
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .8,.8,.8

[State 1001, Anglesetter]
type = Null
triggerall = time = 0;var(40) = 0
trigger1 = ishelper(3102)
trigger1 = (var(0):= 0) || 1
trigger2 = ishelper(3103)
trigger2 = (var(0):= 90) || 1
trigger3 = ishelper(3104)
trigger3 = (var(0):= 180) || 1
trigger4 = ishelper(3105)
trigger4 = (var(0):= 270) || 1

[State 1001, VS]
type = varset
trigger1 = 1
fvar(0) = ifelse(power>2960,(3000-power)/30.0,ifelse(power<=40,(power)/30.0,1.0))

[State 3102, STS]
type = statetypeset
trigger1 = power<=10
movetype = I

[State 1010, PS]
type = posset
trigger1 = 1
x = floor(root,pos x)+floor(50*fvar(0)*cos((var(0)+((3000-power)))*pi/180.0))*(-(root,facing))
y = floor(root,pos y)+root,const(size.mid.pos.y)+floor(50*fvar(0)*sin((var(0)+((3000-power)))*pi/180.0))

;[State 4201]
;type = varrandom
;trigger1 = var(48) = 120
;v = 47
;range = 1, 4

[State 4201]
type = varset
trigger1 = 1
v = 47
value = 1

[State 4201]
type = varset
trigger1 = root, anim = 4202
v = 48
value = 0

[State 4201]
type = VarAdd
trigger1 = root, anim = 4201 || root, anim = 4200
v = 48
value = 1

[State 4000, Effect]
type = helper
trigger1 = var(48) = 120
trigger1 = var(47) >= 1 && var(47) < 2
persistent = 0
helpertype = normal
name = "Laser"
ID = 4221
pos = 3,-40
postype = p1
stateno = 4220
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 1001, butt]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 1001, SPR]
Type = SprPriority
Trigger1 = 1
Value = 5
ignorehitpause = 1

[State 1001, AIT]
Type = AfterImageTime
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150
time = 0

[State 1001, Zeeky]
type = DestroySelf
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150
I want that the orbs spawn lasers, but the lasers wont appear.
What do I do wrong? Thanks in advance!
(click to show/hide)



Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #1 on: May 21, 2013, 05:56:46 AM »
Ok, so your triggers are this

trigger1 = var(48) = 120
trigger1 = var(47) >= 1 && var(47) < 2

Aside from the fact the second trigger there is really just var(47) = 1, and the fact that you have it perma set to 1 anyway so it may as well not be there. What are your triggers for var(48) = 120, lets see.

[State 4201]
type = VarAdd
trigger1 = root, anim = 4201 || root, anim = 4200
v = 48
value = 1
They're that, adding up, so it'll take 120 ticks and root MUST be in either of those anims for it to work. Now, we can't see what root is doing so you may need to work that out.

If you're simply worried about the spawning in the first place, alter the triggers to force it. After you establish that your underlying states etc are doing what you want, work out why the triggers aren't working. My guess is that your player enters 4201 and 4200 breifly, and will change back to 4202 periodically, which resets var(48) to 0.

Basically, your issue is var(48) but without seeing the root state, can't really fix squat.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #2 on: May 21, 2013, 07:36:58 AM »
Ok, here are the rootstates:
Code: [Select]
; Lvl 3 Spell 3: Orreries Universe
[Statedef 4200]
type    = S
movetype = A
physics = S
ctrl = 0
velset = 0, 0
anim = 4200
sprpriority = 2

[State 210, PSND]
type = playsnd
trigger1 = time = 0
value = 4200,0 ;Duplicate of 2100,0
channel = 0

;[State 210, PSND]
;type = playsnd
;trigger1 = animelem = 9
;value = 4200,1
;channel = 0

[State 2000, Spellcard Effect]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Spellcard_FX"
id = 3999
stateno = 1999
pos = 0,-50
postype = p1
ownpal = 1
facing = 1
pausemovetime = 40
supermovetime = 40

[state 1010, Za Warudo!]
type = SuperPause
trigger1 = time = 0
time = 40
anim = -1
sound = S2000, 0
p2defmul = 1
poweradd = 0;-3000
unhittable = 1
movetime = 12
darken = 0

[State 4000, Effect]
type = helper
trigger1 = animelem = 6
persistent = 0
helpertype = normal
name = "Planet"
ID = 3102
pos = 3,-40
postype = p1
stateno = 4220
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = animelem = 6
persistent = 0
helpertype = normal
name = "Planet"
ID = 3103
pos = 3,-40
postype = p1
stateno = 4220
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = animelem = 6
persistent = 0
helpertype = normal
name = "Planet"
ID = 3104
pos = 3,-40
postype = p1
stateno = 4220
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = animelem = 6
persistent = 0
helpertype = normal
name = "Planet"
ID = 3105
pos = 3,-40
postype = p1
stateno = 4220
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 1010, DEPLETE DA POWAH!]
type = poweradd
;trigger1 = animelem = 6
trigger1 = animelem = 6 || ((animelem = 6)&&(power < 3000))
value = -1

[State 4000, Effect]
type = helper
trigger1 = time = 0
helpertype = normal
name = "Blackout Effect"
ID = 701
pos = 0,0
postype = p1
stateno = 701
ownpal = 1
facing = 1
pausemovetime = 40
supermovetime = 40

;[State 4000, Bomb]
;type = explod
;trigger1 = animelem = 9
;id = 4201
;removetime = 10
;scale = 1.0,0.1
;anim = 4201
;pos = 0,-50
;postype = p1
;bindtime = -1
;ownpal = 1
;p2stateno = 5300 ;4250
;sprpriority = 5
;removeongethit = 1
;ignorehitpause = 1

;[State 4000, MEX]
;type = modifyexplod
;trigger1 = numexplod(4201) = 1
;id = 4201
;scale = 1.0+(time-22)/10.0,0.1

;[State 4200, CS]
;type = changestate
;trigger1 = animelem = 13
;trigger1 = movecontact = 1
;value = 4201

[State 4200]
type = VelSet
trigger1 = animelem = 22
X = -12
Y = -3

[State 4200, CS]
type = changestate
trigger1 = animtime = 0
value = 4201
ctrl = 0

;---------------------------------------------------------------------------
; Orreries Universe - Flight State
[Statedef 4201]
type    = S
movetype = A
physics = S
ctrl = 0
anim = 4201
velset = 0, 0
sprpriority = 2

[State 1010, DEPLETE DA POWAH!]
type = poweradd
trigger1 = time || ((time = 0)&&(power < 3000))
value = -1

;[State -2, ComboLimit Add]
;type = varset
;trigger1 = time = 0
;v = 6
;value = 0
;persistent = 0

[State 4201]
type = varrandom
trigger1 = 1
v = 45
range = 1, 7
[State 4201]
type = varrandom
trigger1 = 1
v = 46
range = -3, 3

[State 4201]
type = ChangeAnim
trigger1 = var(49) = 1
trigger1 = anim = 4201
value = 4202

[State 4201, I've got to move it move it!]
type = VelSet
trigger1 = anim = 4202
X = var(45)
Y = var(46)

[State 4201, Gotta stop now!]
type = ChangeAnim
trigger1 = anim = 4202
trigger1 = animtime = 0
value = 4201

[State 4201, STOP!]
type = VelSet
trigger1 = anim = 4201
X = 0
Y = 0

[State 4201, NHB]
type = nothitby
trigger1 = 1
value = SCA, AA, AP, AT

;[State 4201, TB]
;type = targetbind
;trigger1 = time = 0
;id = 4200
;pos = 50,0

;[State 210, PSND]
;type = playsnd
;trigger1 = animelem = 6
;value = 4200,2
;channel = 0

[State 3200, CS]
type = changestate
trigger1 = power = 0
Value = 52
Ctrl = 0
EDIT: Okay, I could solve the problem with the lasers not spawning.
However, when the lasers disappear, my character doesn't start to move...
...the movement code is in State 4201, by the way.
« Last Edit: May 21, 2013, 02:03:54 PM by Trinitronity »

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #3 on: May 21, 2013, 08:35:48 PM »
Same as before. Look at your triggers. If they're not working, force them to. If that works and there is nothing wrong with your code, find out what is wrong with the triggers you have.

Your changestate is on animtime = 0. That's a really really simple trigger. The only reason it won't work is if animtime never ends. Do you have a -1 frame? Or a 0 time frame?

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #4 on: May 22, 2013, 12:16:20 PM »
Same as before. Look at your triggers. If they're not working, force them to. If that works and there is nothing wrong with your code, find out what is wrong with the triggers you have.

Your changestate is on animtime = 0. That's a really really simple trigger. The only reason it won't work is if animtime never ends. Do you have a -1 frame? Or a 0 time frame?
The animtime of 4202 is 120.
The problem is that the character never gets to that anim. Probably because var(49) never gets to 1.
However, to be truly sure, I better also post the code of the lasers, since they change var(49) to 1:
Code: [Select]
; Orreries Laser
[Statedef 4221]
Type = S
Movetype = A
physics = N
sprPriority = 1
anim = 4203
ctrl = 0
velset = 0,0

[State 4221, PS]
type = angleset
trigger1 = 1
value = (parent, pos x)*(parent, pos y)

[State 4221]
type = PosSet
trigger1 = 1
X = parent, pos x
Y = parent, pos y

[State 4221, NHB]
type = nothitby
trigger1 = 1
value = sca

[State 4221, Turn]
Type     = Turn
Trigger1 = P2Dist X < 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 4221, HOR]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AP,AA,AT
slot = 0
stateno = 3056

[State 4221]
type = VarSet
trigger1 = time = 479
v = 49
value = 1

[State 4221, CS]
Type = DestroySelf
trigger1 = time = 480
The lasers also have another problem: Their angle doesn't change...
...I know, that I did something wrong with the angle set, but I don't know, what values are correct...

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #5 on: May 23, 2013, 02:46:16 AM »
You said the parent doesn't start to move. You said the movement code is 4201. THIS is how you get into 4201

[State 4200, CS]
type = changestate
trigger1 = animtime = 0
value = 4201
ctrl = 0

No mention of var(49), nothing like that, just simply animtime = 0. There is no changeanim in 4200. You are using the same anim throughout, therefore, is the state change not occuring, in which case anim 4200 never ends, or is there something wrong with 4201 that is dropping you out instantly. Not looking at your angleset stuff because i want you to fix this first. The code is not complex so it's something else you have wrong that you're not looking at. Also, Time on an animation as shown by FF means NOTHING if you have a frame with a -1 or a 0 on it, FF won't take that into account at all in the total.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #6 on: May 23, 2013, 08:11:00 AM »
You said the parent doesn't start to move. You said the movement code is 4201. THIS is how you get into 4201

[State 4200, CS]
type = changestate
trigger1 = animtime = 0
value = 4201
ctrl = 0

No mention of var(49), nothing like that, just simply animtime = 0. There is no changeanim in 4200. You are using the same anim throughout, therefore, is the state change not occuring, in which case anim 4200 never ends, or is there something wrong with 4201 that is dropping you out instantly. Not looking at your angleset stuff because i want you to fix this first. The code is not complex so it's something else you have wrong that you're not looking at. Also, Time on an animation as shown by FF means NOTHING if you have a frame with a -1 or a 0 on it, FF won't take that into account at all in the total.
Uhm...I think, you understood somethig wrong.
State 4200 is only the intro, which spawns the orb.
After the intro, the player goes to 4201 just like intended.
However, while in 4201, the player only stays in place and doesn't even change the animation...
And I checked every animation used there. None of them have -1 or 0.
...what is wrong?

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #7 on: May 23, 2013, 11:39:24 PM »
Oh.

[State 4221]
type = parentVarSet
trigger1 = time = 479
v = 49
value = 1

Change to this. You're looking at the helpers variable, not the parents. Alternatively

trigger1 = helper(blah), var(49) = 1

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #8 on: May 24, 2013, 10:59:56 AM »
Oh.

[State 4221]
type = parentVarSet
trigger1 = time = 479
v = 49
value = 1

Change to this. You're looking at the helpers variable, not the parents. Alternatively

trigger1 = helper(blah), var(49) = 1
Ugh...so it is like that. Well...damn.
I have got a different idea. I want that the character changes var(49) to 1 herself automatically, if all the projectiles are gone. How do I achieve that?

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #9 on: May 24, 2013, 08:07:26 PM »
Are they helpers or projectiles?

Triggerall = time > first helper spawning time
trigger1 = numhelper(ID of a helper) = 0 && numhelper(ID of the next one) = 0 && so on.

All need to be under the same trigger. Not 1/2/3 but all trigger1.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #10 on: May 25, 2013, 02:17:32 AM »
Thanks, it worked.
However, my character doesn't turn at all...
I want that my character turn everytime after an attack that isn't the first attack.
Also, for some reason, the lasers wont repspawn, though that has very probably has something to do with "persistant = 0"...should I change it to "persistant = -1"?

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #11 on: May 25, 2013, 03:59:24 AM »
Doesn't turn ever, or doesn't turn while attacking. That's too vague, there is no context for whether it's this move or an overall feature or what.


[State 1001, Zeeky]
type = DestroySelf
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150

Ok, so that's your destroyself. Now, the one here that might be the issue is trigger3, you don't REALLY have a good "out" for the helpers. Most people would include times, or leaving the screen, or the root no longer being in the root state.

[State 1010, DEPLETE DA POWAH!]
type = poweradd
;trigger1 = animelem = 6
trigger1 = animelem = 6 || ((animelem = 6)&&(power < 3000))
value = -1
That's terrible. Animelem = 6 is only true for ONE tick, not more, not less. In addition, it won't work if you're on 3000 power anyway, because you've used less than with a maximum value, AND that will take 3000 ticks to deplete all your power even if it was all triggered correctly. 50 seconds in fact.

This is the same as all the others. Read your triggers, force it to occur with different triggers and then alter them in small increments when you find the trouble spot.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #12 on: May 25, 2013, 04:09:54 AM »
Doesn't turn ever, or doesn't turn while attacking. That's too vague, there is no context for whether it's this move or an overall feature or what.
My problem is that my character doesn't turn at all.
[State 1001, Zeeky]
type = DestroySelf
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150

Ok, so that's your destroyself. Now, the one here that might be the issue is trigger3, you don't REALLY have a good "out" for the helpers. Most people would include times, or leaving the screen, or the root no longer being in the root state.
I actually made it on purpose. The orbs should disappear, if all the power is depleted, and not if they're leaving the screen.
[State 1010, DEPLETE DA POWAH!]
type = poweradd
;trigger1 = animelem = 6
trigger1 = animelem = 6 || ((animelem = 6)&&(power < 3000))
value = -1
That's terrible. Animelem = 6 is only true for ONE tick, not more, not less. In addition, it won't work if you're on 3000 power anyway, because you've used less than with a maximum value, AND that will take 3000 ticks to deplete all your power even if it was all triggered correctly. 50 seconds in fact.
Oh yeah, it should have been animelem >= 6...stupid me.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #13 on: May 25, 2013, 04:50:39 AM »
If your character doesn't turn EVER, which is opposite to the default way mugen works, that's either the stage you're using including "no auto turn" or you have a permanent assertspecial in -1 -2 or -3 that uses noautoturn.

Default mugen behaviour is the character turns when p2 is behind them and ctrl = 1

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #14 on: May 25, 2013, 05:59:01 AM »
Default mugen behaviour is the character turns when p2 is behind them and ctrl = 1
Well, I have ctrl = 0, and I have no plans in changing that, since the player cannot control the character while in this state.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #15 on: May 25, 2013, 06:48:26 AM »
Then you answered my question incorrectly the first time. Trying to help but i really do need full answers to questions. Your response SHOULD have been

Quote
My problem is that my character doesn't turn at all.Inside the orries sun states
That way i would know you were talking about inside a specific move rather than the very vague
Quote
However, my character doesn't turn at all...
I want that my character turn everytime after an attack that isn't the first attack.
Which to me reads all sorts of ways which is why i queried it for more specific answers.

You need a

type = turn
in there, based on p2dist X< -10 or something. Working on after the first hit, try stuff. You have many options. Redirect to a helper would be a good first port of call.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #16 on: May 25, 2013, 08:06:11 AM »
I could make it work, thanks you very much.
However, the lasers still spawn only once. ~X(

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #17 on: May 25, 2013, 07:52:53 PM »
There isn't enough info about that, I can't find anything that creates 4221. I can find creation of 4220, not 4221. I still don't know how the attack is meant to work regardless.

Do the lasers only spawn once within the attack and then never again, even after you re-do the move, or do you want multiple lasers spawning (i'm taking a break from the sentence to make sure you read it all and respond fully rather than with partial info) within the attack itself and they keep going till you want them to stop.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #18 on: May 26, 2013, 03:19:56 AM »
...well...I actually have posted the lasers code already, but since I have updated it anyway, I'll post both the orbs and the lasers code:
Code: [Select]
; Orreries Universe Orb
[Statedef 4220]
movetype = A
physics = N
ctrl = 0
anim = 1998
velset = 0,0
sprpriority = 1

[State 2105]
type = AngleDraw
trigger1 = 1
scale = 0.75,0.75
ignorehitpause = 1

;[State 1010, VA]
;type = varadd
;trigger1 = time || ((time = 0)&&(var(40) > 0))
;var(40) = 1

[State 1010, NHB]
type = nothitby
trigger1 = 1
time = -1
value = ,AA,AT
ignorehitpause = 1

[State 1010, CA]
type = changeanim
trigger1 = time = 0
value = 3102+1*ishelper(3103)+2*ishelper(3104)+3*ishelper(3105)+4*ishelper(3106)+5*ishelper(3107)

[State 1001, AFI]
Type = AfterImage
Trigger1 = var(1) = 0
Trans = Add
Time = -1;2
Length = 8
TimeGap = 3
FrameGap = 1
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .8,.8,.8

[State 1001, Anglesetter]
type = Null
triggerall = time = 0;var(40) = 0
trigger1 = ishelper(3102)
trigger1 = (var(0):= 0) || 1
trigger2 = ishelper(3103)
trigger2 = (var(0):= 90) || 1
trigger3 = ishelper(3104)
trigger3 = (var(0):= 180) || 1
trigger4 = ishelper(3105)
trigger4 = (var(0):= 270) || 1

[State 1001, VS]
type = varset
trigger1 = 1
fvar(0) = ifelse(power>2960,(3000-power)/30.0,ifelse(power<=40,(power)/30.0,1.0))

[State 3102, STS]
type = statetypeset
trigger1 = power<=10
movetype = I

[State 1010, PS]
type = posset
trigger1 = 1
x = floor(root,pos x)+floor(50*fvar(0)*cos((var(0)+((3000-power)))*pi/180.0))*(-(root,facing))
y = floor(root,pos y)+root,const(size.mid.pos.y)+floor(50*fvar(0)*sin((var(0)+((3000-power)))*pi/180.0))

;[State 4201]
;type = varrandom
;trigger1 = var(48) = 120
;v = 47
;range = 1, 4

[State 4201]
type = varset
trigger1 = 1
v = 47
value = 1

[State 4201]
type = varset
trigger1 = root, anim = 4202
v = 48
value = 0

[State 4201]
type = VarAdd
trigger1 = root, anim = 4201; || root, anim = 4200
v = 48
value = 1

[State 4000, Effect]
type = helper
trigger1 = var(48) = 120
trigger1 = var(47) >= 1 && var(47) < 2
persistent = -1;0;4
helpertype = normal
name = "Laser"
ID = 4221
pos = 3,-40
postype = p1
stateno = 4221
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 1001, butt]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 1001, SPR]
Type = SprPriority
Trigger1 = 1
Value = 5
ignorehitpause = 1

[State 1001, AIT]
Type = AfterImageTime
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150
time = 0

[State 1001, Zeeky]
type = DestroySelf
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150

;---------------------------
; Orreries Laser
[Statedef 4221]
Type = S
Movetype = A
physics = N
sprPriority = 1
anim = 4203
ctrl = 0
velset = 0,0

[State 2002, T]
type = trans
trigger1 = 1
trans = add
ignorehitpause = 1

[State 4221, PS]
type = angleset
trigger1 = time
value = var(0)+1;(parent, pos x)*(parent, pos y)

[State 2002, AD]
type = angledraw
trigger1 = 1
ignorehitpause = 1

[State 4221]
type = PosSet
trigger1 = 1
X = parent, pos x
Y = parent, pos y

[State 4221, NHB]
type = nothitby
trigger1 = 1
value = sca

[State 4221, Turn]
Type     = Turn
Trigger1 = P2Dist X < 0

[State 52, 1]
type = VelSet
trigger1 = Time = 0
y = 0

[State 52, 2]
type = PosSet
trigger1 = Time = 0
y = 0

[State 4221, HOR]
type = HitOverRide
trigger1 = Time = 0
time = -1
attr = SCA, AP,AA,AT
slot = 0
stateno = 3056

[State 4221, CS]
Type = DestroySelf
trigger1 = time = 480
Also, I haven't tried to re-do the move yet, but I'm sure that if I do, then I will spawn one group of lasers again, and after that not anymore.
And now, the whole plan of how the attack works:
1. The character creates 4 orbs and starts to fly in place (works)
2. the orbs will do one of three bullet patterns (I only coded one of them)
2a. each orb fires a laser (works)
2b. each orbs fires aimed shots
2c. each orbs fires scatter shots
3. the character starts fly to a different place and stops there (works)
4. repeat 2 (doesn't work)
5. repeat 3 (works)
6. repeat 2 (doesn't work)
7. repeat 3 (works)
etc.

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #19 on: May 26, 2013, 03:57:11 AM »
Lets start with simple. Remove the persistent line altogether. If you're not actually making use of it through 0 or > 1 values you don't need it there. It defaults to 1. So do that, try again, come back with results.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #20 on: May 26, 2013, 05:42:45 AM »
It worked, thanks.
I also kinda figured out the persistant system thanks to you.
If no persistant, then projectiles get spawned everytime.
If persistant = 0 or smaller then 0, then projectiles get spawned only once.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #21 on: June 05, 2013, 12:47:46 PM »
Sorry to bump, but aside from the beams still not changing angles (I just couldn't make it work properly), I also got a new problem:
Code: [Select]
; Orreries Universe Orb
[Statedef 4220]
movetype = A
physics = N
ctrl = 0
anim = 1998
velset = 0,0
sprpriority = 1

[State 2105]
type = AngleDraw
trigger1 = 1
scale = 0.75,0.75
ignorehitpause = 1

[State 1010, NHB]
type = nothitby
trigger1 = 1
time = -1
value = ,AA,AT
ignorehitpause = 1

[State 1010, CA]
type = changeanim
trigger1 = time = 0
value = 3102+1*ishelper(3103)+2*ishelper(3104)+3*ishelper(3105)+4*ishelper(3106)+5*ishelper(3107)

[State 1001, AFI]
Type = AfterImage
Trigger1 = var(1) = 0
Trans = Add
Time = -1;2
Length = 8
TimeGap = 3
FrameGap = 1
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .8,.8,.8

[State 1001, Anglesetter]
type = Null
triggerall = time = 0;var(40) = 0
trigger1 = ishelper(3102)
trigger1 = (var(0):= 0) || 1
trigger2 = ishelper(3103)
trigger2 = (var(0):= 90) || 1
trigger3 = ishelper(3104)
trigger3 = (var(0):= 180) || 1
trigger4 = ishelper(3105)
trigger4 = (var(0):= 270) || 1

[State 1001, VS]
type = varset
trigger1 = 1
fvar(0) = ifelse(power>2960,(3000-power)/30.0,ifelse(power<=40,(power)/30.0,1.0))

[State 3102, STS]
type = statetypeset
trigger1 = power<=10
movetype = I

[State 1010, PS]
type = posset
trigger1 = 1
x = floor(root,pos x)+floor(50*fvar(0)*cos((var(0)+((3000-power)))*pi/180.0))*(-(root,facing))
y = floor(root,pos y)+root,const(size.mid.pos.y)+floor(50*fvar(0)*sin((var(0)+((3000-power)))*pi/180.0))

[State 4201]
type = varrandom
trigger1 = var(48) = 120
v = 47
range = 1, 4

[State 4201]
type = varset
trigger1 = root, anim = 4202
v = 48
value = 0

[State 4201]
type = VarAdd
trigger1 = root, anim = 4201; || root, anim = 4200
v = 48
value = 1

[State 4000, Effect]
type = helper
trigger1 = var(48) = 120
trigger1 = var(47) >= 1 && var(47) < 2
;persistent = -1;0;4
helpertype = normal
name = "Laser"
ID = 4221
pos = 3,-40
postype = p1
stateno = 4221
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = var(48) = 120 || var(48) = 124 || var(48) = 128 || var(48) = 132 || var(48) = 136 || var(48) = 140
trigger1 = var(47) >= 2;var(47) >= 2 && var(47) < 3
;persistent = -1;0;4
helpertype = normal
name = "Aimed Shot"
ID = 4222
pos = 3,-40
postype = p1
stateno = 4222
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 1001, butt]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 1001, SPR]
Type = SprPriority
Trigger1 = 1
Value = 5
ignorehitpause = 1

[State 1001, AIT]
Type = AfterImageTime
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150
time = 0

[State 1001, Zeeky]
type = DestroySelf
;trigger1 = root,stateno != 3100
trigger1 = root,movetype = H
trigger2 = root,alive = 0
trigger3 = power <= 0;var(40) >= 150
If I do this, then not every orb does the same attack. How do I fix this?
Oh and I think I did something wrong here as well:
Code: [Select]
[State 4222]
type = VelSet
trigger1 = time = 0
X=1
Y=P2Dist Y+enemynear,const(size.mid.pos.y)
With that, I try to make the aiming part of the second bullet pattern I'm coding while I still have problems with the first one.
While I know, that I did something wrong in the Y part, I don't what the correct value should be...
...please help me. Thanks in advance!

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #22 on: June 06, 2013, 01:46:46 AM »
If you could remove the stuff from your code that's functioning for the next code paste that would be handy. I assume your 2 attacks right now are laser and aimed shot helpers? Which are created at certain times, but also based on the values of 2 variables?

[State 4201]
type = varrandom
trigger1 = var(48) = 120
v = 47
range = 1, 4

I assume this is what you're talking about? I would simply set this at time = 0. It only needs to set once to randomise the variable, that value will be maintained. In addition, varrandom is crap (no really) do this instead

[State 4201]
type = varset
trigger1 = !time
v = 47
value = 1+random%4

You can also make your code more understandable by simply using = sometimes as you're not using floats.
trigger1 = var(47) >= 1 && var(47) < 2
This, is exactly the same as
trigger1 = var(47) = 1
Which is less rubbish to decipher.

Try the above, see if it gives you any other options. You also don't want persistent = 0 on the aimed shot unless you only want it doing a single shot. We can look at the angles later, i don't feel up to that side of things, one problem at a time.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #23 on: June 06, 2013, 08:19:48 AM »
If you could remove the stuff from your code that's functioning for the next code paste that would be handy. I assume your 2 attacks right now are laser and aimed shot helpers? Which are created at certain times, but also based on the values of 2 variables?

[State 4201]
type = varrandom
trigger1 = var(48) = 120
v = 47
range = 1, 4

I assume this is what you're talking about? I would simply set this at time = 0. It only needs to set once to randomise the variable, that value will be maintained. In addition, varrandom is crap (no really) do this instead

[State 4201]
type = varset
trigger1 = !time
v = 47
value = 1+random%4

You can also make your code more understandable by simply using = sometimes as you're not using floats.
trigger1 = var(47) >= 1 && var(47) < 2
This, is exactly the same as
trigger1 = var(47) = 1
Which is less rubbish to decipher.

Try the above, see if it gives you any other options. You also don't want persistent = 0 on the aimed shot unless you only want it doing a single shot. We can look at the angles later, i don't feel up to that side of things, one problem at a time.
Thanks, that looks all good except for that part:
"I would simply set this at time = 0. It only needs to set once to randomise the variable, that value will be maintained."
The variable doesn't get set once, but every time the orbs prepare thier next bullet pattern, since they will always do a different one. Aside from that, everything else looks even better then my attempt.

Offline Trinitronity

  • Infinity Regular
  • ****
  • Posts: 841
  • Country: Germany de
  • Last Login:January 13, 2023, 01:26:38 PM
  • Working on coming back to MUGEN
    • Email
Re: Something just don't want to get spawned
« Reply #24 on: June 08, 2013, 01:05:08 PM »
Sorry to bump, but thanks to Seravy from MFG, this problem is finally fixed.
Now I would really like to know, how I can change the angle of the aimed shot based on the direction of the aimed shots:
Code: [Select]
[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))!=0
X=(((2/(((P2Dist X/(P2Dist Y+enemynear,const(size.mid.pos.y)))**2)+1))**0.5)*(P2Dist X/(P2Dist Y+enemynear,const(size.mid.pos.y))))
Y=(2/(((P2Dist X/(P2Dist Y+enemynear,const(size.mid.pos.y)))**2)+1))**0.5

[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))!=0
Trigger1=Vel X<0
Trigger1=P2Dist X>0
X=-vel X

[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))!=0
Trigger1=Vel X>0
Trigger1=P2Dist X<0
X=-vel X

[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))!=0
Trigger1=Vel Y<0
Trigger1=P2Dist Y+enemynear,const(size.mid.pos.y)>0
Y=-vel Y

[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))!=0
Trigger1=Vel Y>0
Trigger1=P2Dist Y+enemynear,const(size.mid.pos.y)<0
Y=-vel Y

[State 1121]
Type=VelSet
Trigger1=time=0
Trigger1=(P2Dist Y+enemynear,const(size.mid.pos.y))=0
X=2
Y=0
Thanks in advance!

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Something just don't want to get spawned
« Reply #25 on: June 08, 2013, 07:42:47 PM »
Math. Stick with Seravy, i suck at math. All i'd do for this is try random values.

There is an aimed shot projectile code at guild though.

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Classic VS : Athena by ELECTRO
[May 10, 2024, 02:44:09 PM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Neon Light Force Demo by kyoman
[May 08, 2024, 12:50:05 PM]


D2TD VS Showcase Thread by D2TD
[May 05, 2024, 10:08:50 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]


X-Men Training Room (Bright & Dark) Stage 1.1 & 1.0 by MatreroG
[April 05, 2024, 10:55:29 AM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[April 01, 2024, 11:03:03 PM]

* IMT Calendar

May 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 [11]
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal