collapse

Author Topic: Desperate for some Helper assistance!  (Read 459 times)

0 Members and 1 Guest are viewing this topic.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Desperate for some Helper assistance!
« on: August 10, 2008, 02:42:23 PM »
Im trying to learn to do this from Sludges dog attack from his jill, but I ran into a glitch thats amazingly frustrating, and make no sense.

The Hyena comes out no problem, it jumps, and attacks, but when it comes down it turns into p1 stance creating a clone. It should land, and run off till it destroys itself.

I have notice on certain stages, if p2 is right against the wall it will work every once in a while. Ive checked every animation, made sure theres no conflicting states, but nothing makes any differance :'(


Heres the code, anyone see any problems? Its like its not even getting to state 1806, but I cant figure out why!  :'(

;-----------------
;Calling HYENA
[Statedef 1800]
type = A
movetype = I
physics = S
velset = 0,0
ctrl = 0
anim = 1800
poweradd = 10


[State 0, Helper]
type = Helper
trigger1 = animelem = 2 && numhelper(1805) = 0
helpertype = normal ;player
name = "Hyena"
ID = 1805
stateno = 1805
pos = -140,0
postype = back    ;p2,front,back,left,right
ownpal = 1

[State 0, VelSet]
type = VelSet
triggerall = numhelper(1805) > 0
trigger1 = anim = 1800 && ((helper(1805), pos x) - (pos x)) = [-100,100]
y = -9

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = numhelper(1805) > 0 && anim = 1800
trigger1 = ((helper(1805), pos x) - (pos x)) = [-100,100]
trigger2 = time >= 60
statetype = A       ;S,A,C,L
movetype = I        ;I,A,H
physics = A         ;A,C,S,N

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = numhelper(1805) > 0 && anim = 1800
trigger1 = anim = 1800 && ((helper(1805), pos x) - (pos x)) = [-100,100]
trigger2 = time >= 60
value = 1801

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1801 && vel y >= 0
value = 1802

[State 0, ChangeState]
type = ChangeState
trigger1 = animelemno(0) > 2 && numhelper(1805) = 0
value = 0
ctrl = 1

;Hyena
[Statedef 1805]
type = A
movetype = A
physics = S
velset = 5,0
ctrl = 0
anim = 1805
sprpriority = 3

[State 0, NotHitBy]
type = NotHitBy
trigger1 = BackEdgeBodyDist <= 0
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1



[State 0, HitOverride]
type = HitOverride
trigger1 = 1
attr = SCA, AA, AT, AP
slot = 1
stateno = 1807
time = -1

[State 0, VelSet]
type = VelSet
trigger1 = anim = 1805
x = 5

[State 0, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 0, StateTypeSet]
type = StateTypeSet
triggerall = anim = 1805
trigger1 = p2bodydist x = [0,80]
physics = A

[State 0, VelSet]
type = VelSet
triggerall = anim = 1805
trigger1 = p2bodydist x = [0,80]
x = 5
y = -8

[State 0, ChangeAnim]
type = ChangeAnim
triggerall = anim = 1805
trigger1 = p2bodydist x = [0,80]
value = 1806

[State 200, 1]
type = HitDef
trigger1 = anim = 1806 && movecontact = 0
attr = S, NA                     ;Attribute: Standing, Normal Attack
damage = 33, 5                   ;Damage that move inflicts, guard damage
animtype = Back                ;Animation type: Light, Medium, Heavy, Back (def: Light)
guardflag = MA                   ;Flags on how move is to be guarded against
hitflag = MAF                    ;Flags of conditions that move can hit
priority = 7, Hit                ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 2,4                 ;Time attacker pauses, time opponent shakes
sparkno = 0                      ;Spark anim no (Def: set above)
sparkxy = 25, -35               ;X-offset for the "hit spark" rel. to p2,
;Y-offset for the spark rel. to p1
hitsound = 5, 0                  ;Sound to play on hit
guardsound = 6, 0                ;Sound to play on guard
ground.type = High               ;Type: High, Low, Trip (def: Normal)
ground.slidetime = 5             ;Time that the opponent slides back
ground.hittime  = 12             ;Time opponent is in hit state
ground.velocity = -6,-4             ;Velocity at which opponent is pushed
airguard.velocity = -1.9,-.8     ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))
air.type = High                  ;Type: High, Low, Trip (def: same as ground.type)
air.velocity = -6,-4            ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12                 ;Time before opponent regains control in air
getpower = 15,5
givepower = 10, 5
fall = 1
fall.recover = 0



[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1806 && vel y = 0
value = 1807



;Hyena Landing
[Statedef 1806]
type = A
movetype = I
physics = S
velset = 5,0
ctrl = 0
anim = 1808

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim = 1808 && animtime = 0
value = 1805

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 5

[State 0, DestroySelf]
type = DestroySelf
trigger1 = frontedgebodydist < -30
trigger2 = time >= 60

;Hyena was hit
[Statedef 1807]
type = A
movetype = H
physics = A
velset = -6,-6
ctrl = 0
anim = 1809

[State 0, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S7,3
volume = 150

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 1
value = 1

;[State 0, PlaySnd]
;type = PlaySnd
;trigger1 = time = 0
;value = S0,0
;volume = 0

;Hyena lying dead
;-----------------
[Statedef 1808]
type    = A
movetype= I
physics = N
ctrl = 0
anim = 1810
velset = 0,0

[State 0, VarSet]
type = VarSet
trigger1 = time = 0 && var(2) = 0
v = 2
value = 2

[State 0, VarSet]
type = VarSet
trigger1 = time = 0
v = 1
value = 255

[State 0, VarAdd]
type = VarAdd
trigger1 = 1
v = 1
value = -8

[State 0, DestroySelf]
type = DestroySelf
trigger1 = var(1) <= 0

[State 0, Trans]
type = Trans
trigger1 = 1
trans = addalpha
alpha = var(1),255



Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #1 on: August 10, 2008, 03:00:13 PM »
state 1805, never changes to 1806...and it doesnt have a destroyself


sig made by shullbocka

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #2 on: August 10, 2008, 03:20:44 PM »
I know, it didnt make sense to me either but thats the way Sludges jill code works for it. and it does work in certain positions

So I should try to make a change state from 1805-to-1806, and give 1805 a destroy state?

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #3 on: August 10, 2008, 03:44:56 PM »
I know, it didnt make sense to me either but thats the way Sludges jill code works for it. and it does work in certain positions

So I should try to make a change state from 1805-to-1806, and give 1805 a destroy state?

never mind, that made no differance at all  ~X(

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #4 on: August 10, 2008, 06:16:44 PM »
 if that code works...check the air, maybe you are makng something different.......you can use the debug to search fo the error, in the statedef -2 use a displaytoclipboard, and use as a trigger numhelper(xxxx)....in the values that you are going to check, put helper,stateno  .........and helper, anim...so you can have more idea where to start checking


sig made by shullbocka

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #5 on: August 10, 2008, 07:11:42 PM »
I think I got it, I added this

[State 1805, 2]
type = ChangeState
trigger1 = AnimTime = 35
value = 1806

[State 1805, DestroySelf]
type = DestroySelf
trigger1 = time = 100

seems like the time has to be just right for it to work, or it runs off a few inches off ground. still not perfect, but I think I can fiddle it into working since I gotta recode it from ground up anyhoo.

Appreciate the help though, when Im ready to smash my laptop some one here always gets me pointed in the right direction.  :thumbsup:


 

Offline Sludge

  • MUGEN Content Architect
  • *****
  • Posts: 110
  • Last Login:March 22, 2024, 06:44:27 PM
Re: Desperate for some Helper assistance!
« Reply #6 on: August 10, 2008, 07:47:52 PM »
No, you had everything right... Your just missing the line of code that returns the dog to it's proper state when it lands on the ground.

Go into statedef 52 of jill's common .cns (the "Jump Land" statedef)

Look for this little line of code:

[State 0, ChangeState]
type = ChangeState
trigger1 = ishelper(1805)
value = ifelse(var(1) = 1,1808,1806)

helper 1805 is the dog, there are two possible state's that the dog can change too (wether it's attack was successful or whether it was hit during his leap)

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Desperate for some Helper assistance!
« Reply #7 on: August 11, 2008, 11:01:19 AM »
That worked perfect, wow thanx Sludge.

As some one who is learing code, was there a reason that it was coded that way, instead of a changestate? I get why you added it to the jump land in state 52, as an alternate. I just havent seen that very often, and wondered if theres a benefit to doing it that way?

Offline Sludge

  • MUGEN Content Architect
  • *****
  • Posts: 110
  • Last Login:March 22, 2024, 06:44:27 PM
Re: Desperate for some Helper assistance!
« Reply #8 on: August 11, 2008, 06:26:46 PM »
 When the dog jump's he is using mugen's physics engine, his jump (rising in the air) isn't an animation (as how programmer's might do it). So since he is using the actual physics the changestate has to be in statedef 51 to catch the dog and direct him to the correct state (if not he would just go to state 0 and become a jill clone). In my opinion this is the best way to do this, because it will work every time.

 Using the actual physics engine as opposed to having the dog look like he is rising up via the .air file is one of those little thing's that separates the good programmer's from the average programmer's. (In my opinion)

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

Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by ExShadow
[November 02, 2024, 04:54:41 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]


Classic VS : Balrog by ELECTRO
[October 08, 2024, 04:35:53 PM]

* IMT Calendar

November 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

SimplePortal 2.3.5 © 2008-2012, SimplePortal