YesNoOk
avatar

Modify an char of MK to my wood that I want and unique. (Read 3061 times)

Started by DosKillerFighterTrue, October 26, 2023, 02:43:15 am
Share this topic:
Modify an char of MK to my wood that I want and unique.
New #1  October 26, 2023, 02:43:15 am
  • avatar
  • *
    • Argentina
Hello everyone, I'm new to coding in Mugen.

I've tried to tackle this challenge on my own, but being a beginner, I didn't achieve the desired results. My goal is to make a modification to Raiden's torpedo attack. The idea is that instead of finishing in the standard way or upon hitting a wall, the torpedo should move upward for a set period of time (without randomness), then descend for a predefined duration (also without randomness). Finally, it should return to the center without teleporting to the combat center, emulating the basic version of the move before its conclusion. If my explanation isn't clear, I'd be happy to provide an example image or video to better illustrate what I have in mind ("illustrate what I have in mind" Lol)
image:https://imgur.com/YWVw4p7
video (put the video at speed 1.5, it is the original speed I want to make):
Thank you in advance for any help you can provide.

authour name:Diegoni and aa250.

name of char:Raiden MK2 (Cartoon).

Spoiler, click to toggle visibilty
Last Edit: April 19, 2024, 05:22:45 pm by DosKillerFighterTrue
Re: Modify an char of MK to my wood that I want and unique.
#2  October 26, 2023, 04:35:56 am
  • ****
  • Objection! Sustained!
    • Russia
    • mitia.pogorelov1@yandex.ru
OK, here are a couple of tips.
  • You need a State 1101, since 1005 has a ChangeState, that redirects Raiden into some other state when the move HITS (hence the trigger, MoveHit).
  • You will need to edit the animation itself. What I'm about to suggest is for MUGEN 1.1 and higher only (so, if you're using MUGEN 1.0, it won't work), but it will be the easiest way to make this thing work. You will need a LOT of new elements of animation, and you will need to work not with Animation Editor in FF, but with animation's TEXT.

    You see, text version of animation is a set of parameters that get applied in current animelem. However, while for 1.0 it wnds on transparency settings, 1.1 allows you to changs each sprite's X Size, Y Size and Rotation Angle separately. Here is how one element works:
Code:
Sprite's Group, Sprite's Index, X Axis position, Y Axis position, Time, Flip, Transparency, X Scale multiplier, Y Scale Multiplier, Rotation Angle
Everything after Time and before Scale parameters can be left empty to leave the parameters unchanged. So, if you just want to change the angle, all you need to add is [,,,1 ,1 , Rotation Angle]. You add many new animelems with the same sprites, apply different angles to them and move them around with Blue Cross to place the, properly. There are more reliable ways to do so, but they might be too hard for you right now.
P.S.: you might want to do the same with Target's animation for this move.
  • Now, the State 1101. You need to edit there 3 things: TargetBind, VelSet and, perhaps, ChangeState.
    • TargetBind is a code, that binds the target (aka hurt enemy) to the character's certain position. Obviously, its' parameters are X and Y. So, since Raiden will be rotated a lot, that means target's position must change too. You will need a LOT of new TargetBind codes, each for every edited animelem. Here is how they shall look:
Code:
[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElemTime(1)>=0 && AnimElemTime(2)<0
time = 1
pos = Pos X, Pos Y
    Trigger like this makes sure, that code works for every frame between listed in brackets animelems. In my example it will work for whole AnimElem 1, but will stop working at AnimElem 2.
    And how do I find the position, you might ask? In coding section you'll find Offset Viewer. Just open it, find there a needed animation (the one you worked on), select a needed animelem, and place the second character's green cross to the connection point you need. You'll see the X and Y values right by the animation selector.
[/list]
    • VelSet is the code for character's movement. Again, give it the same treatment: any X and Y velocities you want for each individual animelem. Preferably with the same kind of triggers as above. Keep in mind: like with many other things that aren't scale, to move things UP you need to use the NEGATIVE values, and vise-versa.
      • ChangeState changer your character's state to another one. In this specific case, it transitions Raiden into a bounce back state after he eaches the wall (aka low enough Distance from the Front Edge of the screen, FrontEdgeBodyDist). Can't give you suggestions yet since I don't get your idea in its' entirety yet, but keep in mind: then Raiden will reach the wall, he will hit it, because this code is there, and it works.
    That's, pretty much, all you need to know. Hope you'll get it done.
Last Edit: October 26, 2023, 04:41:02 am by Trololo
Re: Modify an char of MK to my wood that I want and unique.
#3  October 28, 2023, 02:04:08 am
  • avatar
  • *
    • Argentina
thank you!, it worked for me, the truth is that I was trying to understand you a lot, but I was able to understand some things like that I have to use mugen 1.1 I always use it, and edit animation as text, I feel that I have learned from what I do, but another one I had I have to search on the internet what it means to be able to understand me well, your explanations are well understood but I usually can't imagine or I can't understand it for myself or I don't speak Spanish, I find it important to understand when people explain things to me with things like programming or advanced functions and I also have to translate it into Spanish in Google Translate because I understand it a little better in Spanish because I am from Argentina and I only understand a little in English, but I have to edit some text that would take me a long time to translate into Spanish because sometimes it translates badly. Even so, I saw your explanation again and it became clear to me. Well, I was able to make my idea work, it was difficult but I did it, I did it on my own, but one question, should I replace AnimElemTime and improve the code or leave it as is the code? (is the animation when he is hit by raiden's torpedo) "[Statedef 1103]
type = S
movetype = A
physics = S
juggle = 4
poweradd = 0
velset = 0,0
ctrl = 0
facep2 = 1
sprpriority = 2

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(1) >= 0 && AnimElemTime(2) < 0
x = -2
y = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(2) >= 0  && AnimElemTime(3) < 0
y = -1
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(3) >= 0  && AnimElemTime(4) < 0
y = 1
x = 0

[State 0, VelSet]
type = VelSet
trigger1 = AnimElemTime(4) >= 0
x = -2
y = 0

[State 0, PosSet]
type = PosSet
trigger1 = time = 70
x = 30
y = 10

[State 0, PosSet]
type = PosSet
trigger1 = time = 90
x = 70
y = -80


[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = time = 0
value = 4531


[State 0, ChangeState]
type = ChangeState
trigger1 = AnimElemTime(4) >= 30
value = 4532
ctrl = 0"

I can't explain the idea well to you but I'll leave it like that for now (I'll continue correcting it later), there are other problems that I may face, but I prefer to address them on my own unless I give up. Thank you very much for all your help so far!
Re: Modify an char of MK to my wood that I want and unique.
#4  October 29, 2023, 05:38:15 am
  • *****
  • Shame on you!
    • USA
The way you're using AnimElemTime is good. Good job man.
If you have any questions feel free to ask. One tip on translating to and from in google: Use periods a lot. Try to make your sentences smaller; more concise. Google seems to do better. Then I always convert and convert until the meaning of words don't change.

Also, if you don't know what certain things do, you can use Mugen Class to look them up
https://mugenguild.com/forum/topics/the-mugen-docs-master-thread-168949.0.html
vVv Ryuko718 Updated 10/31/22 vVv