YesNoOk
avatar

dont know how to do this *SOLVED* (Read 686 times)

Started by sgn15, November 30, 2010, 01:46:39 pm
Share this topic:
dont know how to do this *SOLVED*
New #1  November 30, 2010, 01:46:39 pm
  • ***
400             - call helpers
401             - multiple helpers walking to the screen
402             - helpers' stance
403 to 409  - helpers' different attacks

just think of the helpers as same soldiers so they have same walking animations and stance animations but they have different attacks using different guns, knifes, etc

heres what i have done so far

Spoiler, click to toggle visibilty

problem: i dont know how to trigger the multiple changestates from 402 to 403, 404, 405, 406, up to 409

and if i need to use varset and/or varadd, please explain to me because i didnt fully understand how to use them from reading the docs in mugen
Last Edit: December 09, 2010, 03:23:33 pm by sgn15
Re: dont know how to do this
#2  November 30, 2010, 02:29:45 pm
  • avatar
  • ****
one, you should think about using change animation when you are not changing to an attack.
two, why are you using the position to trigger the attack state. it might be better to use change state with a P2BodyDist or P2Dist trigger.

use a vel set to move your walking animation closer to P2 but I wouldn't use pos as the trigger.
Re: dont know how to do this
#3  November 30, 2010, 02:46:39 pm
  • ***
thanks for replying

one, you should think about using change animation when you are not changing to an attack.
i tried it but then when it changed to stance animation it is still moving (because of velset)

two, why are you using the position to trigger the attack state. it might be better to use change state with a P2BodyDist or P2Dist trigger.

like this?

inside state 401

[State 0, ChangeState]
type = ChangeState
trigger1 = p2dist x = 50
value = 402
ctrl = 0

use a vel set to move your walking animation closer to P2 but I wouldn't use pos as the trigger.

i used animelem = 1 as trigger. is it inappropriate?

how can i do these things for multiple helpers?
Re: dont know how to do this
#4  November 30, 2010, 03:02:14 pm
  • ***
for example, if i call 5 helpers (state 401) in state 400, my problem is to change from 5 walking states (401) to 5 multiple stance animations (402)

changing from stance (402) to 5 different attack states (403 to 409) can be done like this. is it correct?

[State 0, ChangeState]
type = ChangeState
trigger1 = p2dist x = 50
value = 403
ctrl = 0

[State 0, ChangeState]
type = ChangeState
trigger1 = p2dist x = 80
value = 404
ctrl = 0
Last Edit: November 30, 2010, 04:16:58 pm by sgn15
Re: dont know how to do this
#5  November 30, 2010, 08:16:11 pm
  • avatar
  • ****
Okay, so you animation is walking then standing or standing then walking?

If it's the first one. make the helpers animation the standing animation. Use a time trigger to change the animation and not the state to the walking animation. At this point set the X vel so he moves forward.

Then change the walking animation to attacking animation when it gets to a desired distance with p2dist and set the vel back to 0.
And those helpers need to have different stateno's

---------

if it's walking then standing, set the vel back to 0 when he reaches the desired distance and change the animation to standing. then change the state to attacking with a time trigger.



Do all this in the helpers def. try it with just one helper first.



Re: dont know how to do this
#6  December 01, 2010, 05:00:34 am
  • ***
thanks
this is how i did it. i tried it for one helper only. i think it works now (for one helper)

Spoiler, click to toggle visibilty

now my problem is how to change into multiple different attack states.

so for example:
if i plan to call 5 helpers (all state 401 but in different positions) then change all 5 into 5 stance states (402) then change all 5 stance to different attack states (403 to 407)
Last Edit: December 01, 2010, 05:23:33 am by sgn15
Re: dont know how to do this
#7  December 01, 2010, 05:42:31 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
ID all your helpers. Give each one a different ID then you can define which state each one should go to

trigger1 = ishelper(1)
value = 403

trigger1 = ishelper(2)
value = 404

and so on. Set your triggers beyond that however you like, as long as they match the conditions you want you'll be fine.



In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#8  December 01, 2010, 01:38:58 pm
  • ***
I did it for one helper for now. i saw some problems.

1.
Spoiler, click to toggle visibilty

the pink-clothed guy is my char. the big guy in black is the helper. p2 is not on the picture. the laser thingy is his attack. it has this annoying "afterimage effect" i want to remove

this is the sprite for the projectile
Spoiler, click to toggle visibilty

the projectile is only one sprite. i tried different x,y for the velocity. how do i fix and remove the "afterimage effect" of the projectile (because in CNS i didnt used any afterimage code)

2. sometimes the helper doesnt stop walking (doesnt change from walking state 401 to stance state 402). the helper just walks from the left side of the screen to the right side of the screen.

Spoiler, click to toggle visibilty
Last Edit: December 05, 2010, 08:21:05 am by sgn15
Re: dont know how to do this
#9  December 01, 2010, 02:23:15 pm
  • ***
i tried to code the projectile as a helper instead. but it has the same "afterimage effect" because of the velset

edit: i tried coding a simple projectile with velset of 5,0 and theres still that afterimage effect. so its not about the velset anymore. what could the source of that afterimage effect be? im still trying to figure it out
Last Edit: December 01, 2010, 03:24:19 pm by sgn15
Re: dont know how to do this
#10  December 02, 2010, 01:00:37 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
trigger1 = AnimElemtime(4) >= 100

animelemtime(4) = 100; throw projectile
animelemtime(4) = 101; throw projectile
animelemtime(4) = 102; throw projectile
animelemtime(4) = 103; throw projectile
animelemtime(4) = 104; throw projectile
animelemtime(4) = 105; throw projectile
animelemtime(4) = 106; throw projectile

and so on, that'll do it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#11  December 02, 2010, 03:52:58 am
  • ***
trigger1 = AnimElemtime(4) >= 100

animelemtime(4) = 100; throw projectile
animelemtime(4) = 101; throw projectile
animelemtime(4) = 102; throw projectile
animelemtime(4) = 103; throw projectile
animelemtime(4) = 104; throw projectile
animelemtime(4) = 105; throw projectile
animelemtime(4) = 106; throw projectile

and so on, that'll do it.

it's still the same. i dont know why.
i also tried just adding the same sprite for 4th animelem as 5th sprite and using trigger1 = animelem = 5 and it worked.

now, the other problem is the bug (the helpers just pass through the p2). they dont change to stance state. is it because of the p2dist (or distance of p1 to p2 when p1 calls the helpers?) or i cant call the helpers again twice in a row (i have to use other attacks/states before i can call these helpers again)
Re: dont know how to do this
#12  December 02, 2010, 04:06:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Helpers can always pass through opponents unless you apply playerpush

[mcode]type = playerpush
trigger1 = 1
value = 1[/mcode]

that is not copy paste. And yeah, i'm sure animelem = 5 did because you weren't spawning the projectile over and over. Animelemtime(4) = 0 would have also worked perfectly.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#13  December 02, 2010, 04:33:00 am
  • ***
i read about playerpush's explanation and i think its not going to solve the problem/bug. so when i call my helper, it works. but when i move around, call again the helper, they just pass through and not do the changestate to state 402 (stance state)

i still dont know what the source of the bug is. but its not about helper being/not being able to pass through the players.

im thinking about whether its the p2dist trigger or something else
Re: dont know how to do this
#14  December 02, 2010, 02:50:00 pm
  • ***
i have a slight idea now of what is wrong. is there a limit to how many helpers a char can have?

because i have other states that call helpers as well, so is there like a possible overload of helpers in my char?
Re: dont know how to do this
#15  December 03, 2010, 04:52:24 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Helper limit is defined in mugen.cfg. It defaults to 32. If you have that many, you've done something rather silly.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#16  December 05, 2010, 07:16:54 am
  • ***
ok this is it.
400 - call helpers
401 - helpers' walking forward states
402 - helpers' stance
403-409 and 4010 - helpers' 8 different attack states (all with projectiles coded inside each statedef)
6007 - hit state
6009 - helpers' walking back states (after attacking, the helpers walk back)

 i finished it and i found some problems:
- sometimes when i call the helpers, only some of them (mostly either first 4 or last 4 helpers and sometimes no helper at all) only attack, the rest of the helpers just walk past the p2 (didnt go to state 402)

Spoiler, click to toggle visibilty
Re: dont know how to do this
#17  December 05, 2010, 07:31:06 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
That's because you're using

parentdist = something

If it doesn't hit that value EXACTLY, nothing will happen. If you were to put a line some distance in front of you and walk, with the EXACT same steps all the way, would you be guaranteed to step on it? Most likely not. Vel is the same in mugen. Unless that spot is precise for the helper, it won't change state. Try <= something instead.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#18  December 05, 2010, 08:04:08 am
  • ***
That's because you're using

parentdist = something

If it doesn't hit that value EXACTLY, nothing will happen. If you were to put a line some distance in front of you and walk, with the EXACT same steps all the way, would you be guaranteed to step on it? Most likely not. Vel is the same in mugen. Unless that spot is precise for the helper, it won't change state. Try <= something instead.

oh. thanks.

probably my last question about this:
i want to use a superpause but let the helpers walk into their positions and until the end of their stance animation while the superpause is happening. where do i use the superpause? in all 3 states (400,401,402) ?
Re: dont know how to do this
#19  December 05, 2010, 08:06:14 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Give the helpers a supermovetime longer than the pause, then set it off in the players state.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#20  December 05, 2010, 08:08:05 am
  • ***
Give the helpers a supermovetime longer than the pause, then set it off in the players state.

like this?

Spoiler, click to toggle visibilty

what do you mean by "set it off on the player's state"?
Re: dont know how to do this
#21  December 05, 2010, 08:18:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Is the player a helper? Does the player have a state? You know the answer to both of these.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#22  December 05, 2010, 08:22:35 am
  • ***
what do you mean by "set it off"? you mean turn off or stop the superpause?

i want the screen to darken but the helpers are not darkened. how do i do that?

Spoiler, click to toggle visibilty
Last Edit: December 05, 2010, 08:26:39 am by sgn15
Re: dont know how to do this
#23  December 06, 2010, 05:47:24 am
  • ***
help please. this is the last problem here
Re: dont know how to do this
#24  December 06, 2010, 06:50:08 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
And that gives you no right to bump the topic. You have been getting help in a timely manner, this is still page one.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dont know how to do this
#25  December 06, 2010, 06:53:44 am
  • ***
sorry. so what do i need to change to code the way i want the superpause to be (darken = 1 but the helpers are not darkened)