collapse

Author Topic: Resurrection Code Help  (Read 1717 times)

0 Members and 1 Guest are viewing this topic.

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Resurrection Code Help
« on: April 04, 2008, 02:48:34 AM »
Hey folks!

I'm adding a resurrection super to a character, and I'm using the resurrection code that can be found on XGargoyle's site.

I've put it into my cns file under the appropriate states, and everything seems alright code wise....but when I use the character, 1) a clone appears at the start of the match and 2) when the character is KO'ed, they get stuck/frozen in a loop, while they're health refills to full.

SO, it's not really working as intended.

Anyone have any decent resurrection code that's open source they can share?  Or perhaps can assist in ironing out why XGargoyle's won't work?  I can post the code if that helps...



Offline BlizzardTora

  • Forum Member
  • ***
  • Posts: 289
  • Last Login:October 27, 2015, 06:40:10 PM
  • Did I say that I cared?
    • Email
Re: Resurrection Code Help
« Reply #1 on: April 04, 2008, 02:50:15 AM »
If you have downloaded gill (SFIII) he should have a working code.
CVG UNITED
Whatever ,(

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Re: Resurrection Code Help
« Reply #2 on: April 04, 2008, 11:18:04 AM »
...while that may SEEM like sound advice, and don't get me wrong, it is...

1) I have Gill and have looked at the code, and didn't want to necessarily just swipe Gill's code.

2) I was looking for maybe something a little more informative.  Either in so far as how to get it generally working or the like.  One can't just 'copy/paste' code and expect it to work.

XGargoyle's supposedly works, and other people have coded resurrection code...I'm just having issues getting mine to work, and when I resorted to XGargoyle's, it still isn't working properly...so...yeah.

Thanks for the idea though.

If anyone else has any insight, that'd be fantastic.

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Resurrection Code Help
« Reply #3 on: April 04, 2008, 11:28:04 AM »
post your code, so I can check what are you doing


sig made by shullbocka

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Re: Resurrection Code Help
« Reply #4 on: April 04, 2008, 08:22:50 PM »
For the sake of argument at this point, this is the code I got from XGargoyle's site:
copy pasted in it's entirety...I then put it into the appropriate MUGEN states in my character, but no luck.

=============
Resurrection:
=============
Created by NodeX
Special thanks to [E] for the projectile suggestion.

;---------------------------------------------------------------------------
Resurrection: The ability to revive if your character is defeated. Gill from
SF3 is one character with such an ability. (Heck, it's his signature move!)
;---------------------------------------------------------------------------
This helper keeps the round from ending when you lose the match

[State -3, Helper]
type = Helper
trigger1 = (RoundState = 2) && (NumHelper(9000) = 0)
helpertype = Player
name = "Resurrection Super"
id = 9000
postype = p1
stateno = 9000
ignorehitpause = 1
pausemovetime = 999999999999999999999
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

Next, you have to override State 5150. If your character uses its own common states
file, then add the two states to State 5150 (the two states are numbered 10 and 11):

; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 1] ;Normal anim
type = ChangeAnim
triggerall = Time = 0
triggerall = SelfAnimExist(5140)
trigger1 = (anim != [5111,5119]) && (anim != [5171,5179])
trigger2 = !SelfAnimExist(5140 + (anim % 10))
value = 5140

[State 5150, 3] ;Hit up type anim
type = ChangeAnim
trigger1 = Time = 0
trigger1 = (anim = [5111,5119]) || (anim = [5171,5179])
trigger1 = SelfAnimExist(5140 + (anim % 10))
value = 5140 + (anim % 10)

[State 5150, 4] ;Match over anim
type = ChangeAnim
persistent = 0
;trigger1 = Time = 0
trigger1 = MatchOver = 1
trigger1 = Anim = [5140,5149]
trigger1 = SelfAnimExist(anim+10)
value = anim+10

[State 5150, 5] ;Switch to 5110 if liedead anim does not exist
type = ChangeAnim
trigger1 = Time = 0
trigger1 = Anim != [5140,5159]
trigger1 = Anim != [5110,5119]
value = 5110

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 9]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5150, 10]
type = ChangeState
trigger1 = Life > 0
value = 5120

[State 5150, 11]
type = ChangeState
trigger1 = (Life <= 0) && (Var(0) = 0) && (NumHelper(9000) > 0) && (Power >= 1000)
value = 9000

Now, add this to your AIR file. If you change the action number, make sure to
change it in the Resurrection super states:
 
;Used for projectiles...
[Begin Action 9010]
Clsn2: 1
 Clsn2[0] = -23,-640, 19,  0
0,-1, 0,0, -1

The Resurrection super states:

;===================
; Resurrection Super
;===================

[Statedef 9000]
type = S
movetype = I
velset = 0,0
anim = 0
ctrl = 0
poweradd = -1000
sprpriority = 2

This var keeps the Resurrection Super from being used twice in the same round.
[State 9000, VarSet]
type = VarSet
trigger1 = Time = 0
v = 0
value = 1

This NotHitby allows the player to recover at least 10% of their life.
The formula used in the trigger goes like this:

life * 10% / 5 (value used in the lifeadd) * 2 (value that is "modding" the time in the lifeadd)

[State 9000, NotHitBy]
type = NotHitBy
trigger1 = Time <= const(data.life) * 0.10 / 5 * 2
;trigger1 = life >= const(data.life) * 0.10  ;An alternate trigger
value = SCA

[State 9000, Width]
type = Width
trigger1 = 1
player = 45

; The reverse vacuum pushes the player away.
[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = 1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

[State 9000, Reverse Vacuum]
type = Helper
trigger1 = (Time%3) = 0
name = "Reverse Vacuum"
pos = 0, 0
postype = p1
stateno = 9015
helpertype = normal
facing = -1 ;ifelse(random >= 500, 1, -1)
ignorehitpause = 1
size.ground.back = 1
size.ground.front = 1
size.air.back = 1
size.air.front = 1

[State 9000, LifeAdd]
type = LifeAdd
trigger1 = (Time%2) = 0
value = 5

; This "invisible" projectile will "slow down" any projectiles. Thanks to [E] for the suggestion.
[State 9000, Projectile]
type = Projectile
trigger1 = (Time&25) = 0
projanim = 9010
offset = 0,0
velocity = 1, 0
projpriority = 1
projremovetime = 25
; HitDef part of projectile info
attr = S, HP
sparkno = -1
guard.sparkno = -1

[State 9000, ChangeState]
type = ChangeState
trigger1 = life = const(data.life)
value = 0
ctrl = 1

;===========================
; Resurrection Helper States
;===========================

[Statedef 9010]

[State 9010, Invisible]
type = AssertSpecial
trigger1 = 1
flag = invisible

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

[State 9010, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 9010, Bind]
type = BindToParent
trigger1 = 1

[State 9010, DestroySelf]
type = DestroySelf
triggerall = parent, life <= 0
trigger1 = (parent, power < 1000) || (parent, var(0) = 1)

;===============
; Reverse Vacuum
;===============

[Statedef 9015]
;type    = A
anim = 9015

[State 9015, VarRandom]
type = VarRandom
trigger1 = Time = 0
v = 8
range = 1,5

[State 9015, VelSet]
type = VelSet
trigger1 = Time = 0
x = 5 * (3 * var(8)) + 10  ;30

[State 4015, PlayerPush]
type = PlayerPush
trigger1 = p2bodydist X >= 1
value = 1

[State 9015, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA

[State 9015, DestoySelf]
type = DestroySelf
trigger1 = Time > 20

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Resurrection Code Help
« Reply #5 on: April 05, 2008, 12:24:53 AM »
For the sake of argument at this point, this is the code I got from XGargoyle's site:
copy pasted in it's entirety...I then put it into the appropriate MUGEN states in my character, but no luck.

If you just copy pasted it...check that the vars you are using on that doesn't exist already


sig made by shullbocka

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Re: Resurrection Code Help
« Reply #6 on: April 05, 2008, 01:08:45 AM »
Well, I did change the var(0)=0 to be a variable not being used...but otherwise, copy/pasted.

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Resurrection Code Help
« Reply #7 on: April 05, 2008, 09:02:43 AM »
Did you added the helper to the statedef -3????


sig made by shullbocka

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Re: Resurrection Code Help
« Reply #8 on: April 05, 2008, 10:07:28 AM »
Yep.

Added each code bit under the appropriate state.

Put the state -3 helper in the state -3 portion of my overrides.  Put the State 5150 in my overrides section.  Put the 9000 states in my normal section.

Offline Fallen_Angel

  • Global Moderator (out of the office)
  • *****
  • Posts: 1358
  • Last Login:July 04, 2012, 03:11:05 PM
    • Email
Re: Resurrection Code Help
« Reply #9 on: April 05, 2008, 11:14:42 PM »
Yep.
Added each code bit under the appropriate state.

Put the state -3 helper in the state -3 portion of my overrides.  Put the State 5150 in my overrides section.  Put the 9000 states in my normal section.

the helper dhould be coded under the statedef -3 (its diferent than state)....statedef its the definion of the state (these is the whole state)...and the state is a portion of the code....move your helper to statedef -3


sig made by shullbocka

Offline JackDodger

  • Initiate
  • **
  • Posts: 12
  • Last Login:July 20, 2009, 04:04:55 PM
    • Email
Re: Resurrection Code Help
« Reply #10 on: April 06, 2008, 01:03:10 AM »
Sorry I wasn't clear.

I did put the helper under the Statedef -3 portion.

As I mentioned, doesn't work.  Best I got was a clone...

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

Street Fighter 1 Ultimate Ryu by ELECTRO
[May 22, 2024, 03:58:25 PM]


China Town (Revenge of Shinobi) by Lord_Enemil
[May 22, 2024, 03:02:10 PM]


Neon Light Force Demo by Uche_of_IMT
[May 22, 2024, 10:21:37 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by Uche_of_IMT
[May 21, 2024, 11:50:20 PM]


The Spider release + Spider-Man game by kobun
[May 21, 2024, 02:05:24 AM]


Let's all try it together! Yazawanainn gose breakdancing in MUGEN! by GTFoxN6Y
[May 18, 2024, 05:00:14 PM]


[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[May 18, 2024, 11:17:34 AM]


Classic VS : Athena by ELECTRO
[May 15, 2024, 01:25:51 PM]


D2TD VS Showcase Thread by D2TD
[May 12, 2024, 10:20:11 AM]


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

* 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