Runic Variable Absorb damage, then give same damage back.
#1
Inviato 02 November 2008 - 00:15
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?
#2
Inviato 02 November 2008 - 19:26
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...
#3
Inviato 04 November 2008 - 04:19
Nobun, su Nov 2 2008, 20:26, detto:
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...
#4
Inviato 04 November 2008 - 22:58
#5
Inviato 05 November 2008 - 00:19
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.
#6
Inviato 05 November 2008 - 00:59
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.
#7
Inviato 05 November 2008 - 18:05
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...
#8
Inviato 05 November 2008 - 18:18
Nobun, su Nov 5 2008, 19:05, detto:
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
#9
Inviato 05 November 2008 - 19:10
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.
#10
Inviato 05 November 2008 - 19:14
;---------------------------------------------------------------------------
; 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
#11
Inviato 05 November 2008 - 23:53
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).
#12
Inviato 07 November 2008 - 15:34
Nobun, su Nov 6 2008, 00:53, detto:
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)
#13
Inviato 07 November 2008 - 23:31
[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)
#14
Inviato 07 November 2008 - 23:42
Nobun, su Nov 8 2008, 00:31, detto:
[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
#15
Inviato 08 November 2008 - 00:14
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.
#16
Inviato 08 November 2008 - 00:19
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
#17
Inviato 08 November 2008 - 06:26
[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.
#18
Inviato 08 November 2008 - 11:14

Aiuto









