Forum MUGENATION: Runic Variable - Forum MUGENATION

Salta al contenuto

Pagina 1 di 1
  • Non puoi iniziare una nuova discussione
  • Non puoi rispondere a questa discussione

Runic Variable Absorb damage, then give same damage back.

#1 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 02 November 2008 - 00:15

Anyone know how to create a variable that remembers the damage taken during a certain state, then using that same var, attacks to give the same damage back that was recieved? (Example: like Tonberries do on final fantasy games when u attack them, there attack power is based on the damage that youve done to them).

This is what was said already:

[State -3]
type = VarSet
trigger1 = 1
v = 52
value = GetHitVar(damage)

and in the hitdef of the attack, i use: damage = var(52), 0 ; which means if attack is not guarded but lands, then the damage is the amount of damage that was previously given to me by the enemy. If it was guard then the attack takes nothing.

After doing this, the attack didnt do any damage at all. Any help?

0

#2 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 02 November 2008 - 19:26

The trigger is Wrong... In you code, the trigger1 triggers correvtly every trigger and so changes the value of a var even if no damage in that moment.

So I suggest to use a trigger like

trigger1 = gethivar(damage) != 0

however you probably need to add more code to balance the effect... anyway ask step by step what you do you want to fix...
0

#3 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 04 November 2008 - 04:19

Visualizza MessaggiNobun, su Nov 2 2008, 20:26, detto:

The trigger is Wrong... In you code, the trigger1 triggers correvtly every trigger and so changes the value of a var even if no damage in that moment.

So I suggest to use a trigger like

trigger1 = gethivar(damage) != 0

however you probably need to add more code to balance the effect... anyway ask step by step what you do you want to fix...


K, ill let u know tommorrow if this works...
0

#4 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 04 November 2008 - 22:58

Ok, for some odd reason.....the char gives 1/3 of the damage taken, back :pianto:
0

#5 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 05 November 2008 - 00:19

strange... can you post me the DATA CONSTANTS of your char and your opponent? (I need to know it attack and defense are both 100 in all characters or not).

PS Can you see if the hit (to "absorbe") has more than 1 hit? It is possibile that the instructions read only the value of last it but not all the damage.
0

#6 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 05 November 2008 - 00:59

well i was doing this on kfm. his constant attack power is 55. i was fighting against that same char. i also tried it against others. same damage value.

I hit the player with a light punch then hit him back. (damage was 1/3 ((looked like)) of the light punch)(also, same goes for the fierce kick. it was 1/3 of the fierce kick damage.)

Also, i hit him with 3 fierce kicks. It only returned the damage of 1/3 of the first fierce kick.

0

#7 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 05 November 2008 - 18:05

Can I see the CNS code of 1-2 hits (made by opponent) absorbed only by 1/3?

Note: Probably you don't know it, but I cannot make tests nor use Mugen (I have no time). So I can answer only thinking, but without any test, so you can understand that I can help only in a very limited way.
I'm sorry... time ago I was more helpfull, but now my time is more or less null...
0

#8 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 05 November 2008 - 18:18

Visualizza MessaggiNobun, su Nov 5 2008, 19:05, detto:

Can I see the CNS code of 1-2 hits (made by opponent) absorbed only by 1/3?

Note: Probably you don't know it, but I cannot make tests nor use Mugen (I have no time). So I can answer only thinking, but without any test, so you can understand that I can help only in a very limited way.
I'm sorry... time ago I was more helpfull, but now my time is more or less null...


It happens to every opponent. all there attacks do the same way. but here is kfm's attack that i want him to do it in:

[Statedef 10003]; FOCUS RELEASE
type = S
movetype = A
physics = S
juggle = 20
velset = 0,0
ctrl = 0
anim = 10003
poweradd = 0
sprpriority = 2

[State 10003, flash]
type = palfx
trigger1 = time = 0
add = 255,255,255
sinadd = -255,-255,-255,40
time = 10

[State 10003, blueflash]
type = palfx
trigger1 = enemynear, movehit = 1
add = 0,0,255
sinadd = 0,0,-255,60
time = 15

[State 10003, stop]
type = posfreeze
trigger1 = time <= 33
value = 1

[State 10003, ]
type = HitDef
trigger1 = time = 0
attr = S, NA ;Attribute: Standing, Normal Attack
damage = var(56), 0 ;Damage that move inflicts, guard damage
animtype = Hard ;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 = 15, 15 ;Time attacker pauses, time opponent shakes
sparkno = -1 ;Spark anim no (Def: set above)
sparkxy = 9999,9999 ;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 = 10 ;Time opponent is in hit state
ground.velocity = -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 = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air

[State 10003, superchargebgpalfx]
type = allpalfx
trigger1 = MoveContact = 1
time = 8
add = 255,255,255
sinadd = -255,-255,-255,32

[State 10003, slow]
type = pause
trigger1 = movecontact && time = [0,7]
time=1

[State 10003, asserts]
type = assertspecial
trigger1 = 1
flag = nowalk
flag2 = nostandguard
flag3 = nocrouchguard

[State 10003, ctrl]
type = ctrlset
trigger1 = animtime
value = 0

[State 10003,]
type = Helper
trigger1 = NumHelper(10004) = 0 && MoveType != H && stateno = 10003
stateno = 10004
id = 10004

[State 10003, ]
type = null;PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 10003, ]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

0

#9 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 05 November 2008 - 19:10

Perhaps I explained bad. I need the code of the OPPONENT of your char of a hit you absorbed that is returned at 1/3.

For example, if after state 10003 your char do 100 of damage instead of 300 original damage from state XXX of char YYY... In that case I need the CNS code of state XXX of char YYY... not the code of state 10003 that does 1/3 of damage (sorry but my english is bad).

I need only one state... if I need more code (it depends of state you posted) I'll let you know.

However it can be helpfull to have also the code you posted before, but I need this other infos, sorry.
0

#10 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 05 November 2008 - 19:14

ok, heres the light attack of the opponent (kfm):

;---------------------------------------------------------------------------
; Stand Light Punch
; CNS difficulty: easy
[Statedef 200]
type = S ;State-type: S-stand, C-crouch, A-air, L-liedown
movetype= A ;Move-type: A-attack, I-idle, H-gethit
physics = S ;Physics: S-stand, C-crouch, A-air
juggle = 1 ;Number of air juggle points move takes
;Commonly-used controllers:
velset = 0,0 ;Set velocity (x,y) (Def: no change)
ctrl = 0 ;Set ctrl (Def: no change)
anim = 200 ;Change animation (Def: no change)
poweradd = 20 ;Power to add (Def: 0)
sprpriority = 2 ;Set p1's sprite layering priority to 2 (in front)

[State 200, 1]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA ;Attribute: Standing, Normal Attack
damage = 23, 0 ;Damage that move inflicts, guard damage
animtype = Light ;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 = 3, Hit ;Attack priority: 0 (least) to 7 (most), 4 default
;Hit/Miss/Dodge type (Def: Hit)
pausetime = 8, 8 ;Time attacker pauses, time opponent shakes
sparkno = 0 ;Spark anim no (Def: set above)
sparkxy = -10, -76 ;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 = 10 ;Time opponent is in hit state
ground.velocity = -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 = -1.4,-3 ;X-velocity at which opponent is pushed,
;Y-velocity at which opponent is pushed
air.hittime = 12 ;Time before opponent regains control in air

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 200, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

0

#11 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 05 November 2008 - 23:53

Uhm... in this case I cannot find the problem. I try to read again your code tomorrow...

However, try to do this thing:

Run Winmugen in debug Mode and see if the damage value of your hit is 23 after receiving the hit of light pung of kfm (200). (if you run winmugen in debug mode you'll see also the number value of life).
0

#12 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 07 November 2008 - 15:34

Visualizza MessaggiNobun, su Nov 6 2008, 00:53, detto:

Uhm... in this case I cannot find the problem. I try to read again your code tomorrow...

However, try to do this thing:

Run Winmugen in debug Mode and see if the damage value of your hit is 23 after receiving the hit of light pung of kfm (200). (if you run winmugen in debug mode you'll see also the number value of life).


got hit by LP for 12 damage, returned 7 damage.
got hit by HK for 33 damage, returned 17 damage.

So with that said, looks as if its giving damage slightly over a half of the original value.


note:

[State -1]
type = VarSet
trigger1 = GetHitVar(damage) != 0
var(56) = GetHitVar(damage)

0

#13 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 07 November 2008 - 23:31

State -1 is wrong

[State -1, VarSet]
type = VarSet
trigger1 = GetHitVar(damage) != 0
v = 56
value = GetHitVar(damage)

--------

Other errors on state 10003

1) trigger of hitdef is time=0 but it is probably wrong that you have the clsn1 active at the 1st frame of animation

2) trigger of helper

trigger1 = NumHelper(10004) = 0 && MoveType != H && stateno = 10003

seeing the fact this command is into state 10003

trigger = NumHelper(10004) = 0

(movetype !=H && stateno = 10003 are useless)
0

#14 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 07 November 2008 - 23:42

Visualizza MessaggiNobun, su Nov 8 2008, 00:31, detto:

State -1 is wrong

[State -1, VarSet]
type = VarSet
trigger1 = GetHitVar(damage) != 0
v = 56
value = GetHitVar(damage)

--------

Other errors on state 10003

1) trigger of hitdef is time=0 but it is probably wrong that you have the clsn1 active at the 1st frame of animation

2) trigger of helper

trigger1 = NumHelper(10004) = 0 && MoveType != H && stateno = 10003

seeing the fact this command is into state 10003

trigger = NumHelper(10004) = 0

(movetype !=H && stateno = 10003 are useless)



-State -1 really doesnt matter. All negative states are basically the same and have the same rules. Tested in all anyway and everyone give the same effects. Sometimes i put things in -1 (command file) so that all the system effects can be read inside the mugen data common1 instead of having to re-enter coding in every char over and over.

-time = 0 in the hitdef just says which ever part of the clsn hits the char first. Tested already and is true.

-(movetype !=H && stateno = 10003 are useless) : that helper is a part of a super armor. it's not useless to me. Its just backup. doesnt really matter. and can benefit at times depending on what a person wants to accomplish. Can sometimes help for when sometimes when u have things set up correctly, those things can still roll outside of the state. this is just insurance so to speak. not really useless.



*neither coding outlook contribute to the issue that i want to accomplish

0

#15 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 08 November 2008 - 00:14

I'm sorry, as I said before, seeing the fact I cannot make test all my contributes are very limited. Unluckly I cannot help you more in this moment (I have 2 months very full of duties)

However, about state -1, I mean that you write wrong the code of VarSet

WRONG:
[state -1, varset]
type = Varset
trigger1 = gethitvar(damage)
var(56) = gethitvar(damage)

see my previous answer.
0

#16 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 08 November 2008 - 00:19

[State -1, VarSet]
type = VarSet
trigger1 = GetHitVar(damage) != 0
v = 56
value = GetHitVar(damage)



*the above means the same as the below*




[State -1, VarSet]
type = VarSet
trigger1 = GetHitVar(damage) != 0
var(56) = GetHitVar(damage)



P.S.: Thanx for your time anyways

0

#17 L   shinra358 

  • Chan
  • Punto
  • Gruppo: Membro
  • Messaggi: 42
  • Iscritto: 10-September 07

Inviato 08 November 2008 - 06:26

Hmmmm I got it to work.

[State -1]
type = VarAdd
trigger1 = !var(56)
var(56) = GetHitVar(damage)

since it returned the damage of the last hit only by 1/2 +1, then i put this as the damage:

damage = (var(56)*2)-1 ;which means that the damage is multiplied by 2 taking away 1 to equal the amount of damage that the player gave you ;)


now alls i gotta figure out is using mulitple hit storage.

0

#18 L   Nobun 

  • Horse Rider Skull Phantom. Rarely Here.
  • Gruppo: SuperModeratore
  • Messaggi: 4898
  • Iscritto: 11-July 04

Inviato 08 November 2008 - 11:14

I'm happy you find a solution for yourself... however, I have to mark that we don't know WHY the original value is 1/2 of original one... I'm afraid that this solution sometimes doesn't work correctly... I hope I'm wrong.
0

Condividi questa discussione:


Pagina 1 di 1
  • Non puoi iniziare una nuova discussione
  • Non puoi rispondere a questa discussione

2 utenti stanno leggendo questa discussione
0 utenti, 2 ospiti, 0 utenti anonimi