Creating a simple command

Started by shadowuy, March 11, 2017, 05:35:06 AM

Previous topic - Next topic

shadowuy

Hi, i want to create a simple command that takes life of enemy player. So far i did this:

in the command section


[Command]
name = "sustract life from enemy"
command = B,F
time = 10

in the state -2 section

[state - 2]
type = targetlifeadd
trigger1 = command = "sustract life from enemy"
value = -100

and it doesnt work....

i tried in another way and it still doesnt work.

in the command section


[Command]
name = "sustract life from enemy"
command = B,F
time = 10

[state -1]
type = targetstate
value = 9600
triggerall = command = "sustract life from enemy"
trigger1 = ctrl

[statedef 9600]
type    = A
movetype= A
physics = N

[State 9600]
type = lifeadd
trigger1 = 1
value = -100

what am i doing wrong here? thx for reading


Memo

Does the attack make contact with the enemy?

shadowuy

Quote from: Memo on March 11, 2017, 06:02:30 AM
Does the attack make contact with the enemy?

there is no attack, its just a command.... so from your answer you are saying that p2 has to be putted in a custom state by a hitdef in order to lose life? because i try the same code but with p1 and it works well.

Odb718

I believe you'll need to use TargetLifeAdd. So, Yes, there will have to be some sort of attack.
http://mugenguild.com/forum/topics/targetlifeadd-sctrl-169891.0.html
vVv Gouken718 vVv SabreTooth718 vVv


Memo

Quote from: Odb718 on March 11, 2017, 09:46:37 AM
I believe you'll need to use TargetLifeAdd. So, Yes, there will have to be some sort of attack.
http://mugenguild.com/forum/topics/targetlifeadd-sctrl-169891.0.html

Check that out and also it might be useful if you set it up as a
Helper that spawns on P2 because it sounds like you don't want
It to be a physical attack

shadowuy

Alright thank you for your answers i manage to make it out. i had a problem with one of the other player states so that was why it didnt work out thank you