News:

MFG's Character of the Month: September 2026 Voting

Main Menu

Golden Silver: More coding problems.

Started by Bloodly, October 30, 2007, 09:46:12 AM

Previous topic - Next topic

Bloodly

Observe the following.



What I want done sounds simple enough.  After the first frame(The start-up), I want him to launch himself forward(and slightly up).

He's not doing so.  He does the animation, but he's not moving at all.

Here's the relevent code:

[Statedef 1011]
type = S
movetype = A
physics = S
anim = 1011
velset = 0, 0
sprpriority = 2
juggle = 4
ctrl = 0
poweradd = 50

[State 1011, 2]
type = VelSet
trigger1 = AnimElem = 2
value = 25, -2

Can you think of what the problem could be?  What I need to add/change?  God forbid, a better way of doing it?

Thank you for your time.
\"So you have chosen....death.\"-Saruman.

DavidGee

If physics = S, the player is not going to jump. Try physics = N or physics = A, the difference being that A applies gravity and changes state to the jump land state where appropriate, while N gives you full control.

Bloodly

#2
Tried N: No change.

Tried A: the command fails outright(Doesn't even start, state doesn't change.)

What's odd is the code is copy-pasted from a similar move where he goes upwards, and that move works fine-it too is set to 'S' physics.  The difference is that the first Velset in the statedef has a number in it, because he moves instantly. 

This one has it set to 0, 0, because I want the movement to start on the second frame, with the VelAdd command, which didn't exist with the upward attack.
\"So you have chosen....death.\"-Saruman.

DavidGee

Physics = A will cause the character to land the same instant the state is entered if there is no velocity, so it can't be used until after the player's vel y < 0 (physics can be changed with StateTypeSet).

With physics = N, the character should definitely move upward; there must be something else. What is action 1011? Is there more to the state?

Also, although this won't prevent the jump, type should = A, or else if the character is hit, it will act as though it's standing and then float midair afterward. And by the way, the velocities you have there are extreme.

Bloodly

#4
It's a fast, long-range move(Covers a screen's length-more, actually) in the source(Guardian Heroes).  I can adjust it(mess with animation time and velocities) AFTER I get the thing WORKING.

There's more code, but it's mostly HitDefs for those frames which are attacks(Frames 2, 3, and 4), and a final command to get it to change to state 50 when it hits Frame 5 and give back control(the move ends in the air-only a little, but enough to allow an air dash).  All copy-paste with changes from the upward.  These two are the only controls on the movement.

The move itself starts on the ground, and I want it treated as ground till the 'launch'.

....Can you tell I'm a newbie to all this?  This is my first character.

Hmm....get it to change it's state on the launch frame....maybe...
\"So you have chosen....death.\"-Saruman.

DavidGee

There should be no problem doing it in a single state. I am thinking that the action is messed up somehow. What follows [Begin Action 1011] in the air file?

Bloodly

I....Don't know, actually.  I use Fighter Factory, and don't mess with text editing except with the coding, which is also done in it. 

....I remember an 'Edit Action in TXT' option.  I'll get what it says.

*Goes*

*comes back*

Well, I had to open the AIR file direct(The 'Edit Action in TXT' option doesn't have editing options like Cut and Paste) but here it is.

;Charge-2
[Begin Action 1011]
Clsn2: 2
  Clsn2[0] = -22, -35, 25, 1
  Clsn2[1] = -21, -68, 30, -33
1010,0, 0,0, 30
Clsn1: 1
  Clsn1[0] = -11, -72, 41, -5
Clsn2: 1
  Clsn2[0] = -14, -73, 33, -14
1010,1, 0,0, 5
Clsn1: 1
  Clsn1[0] = -11, -74, 41, -6
Clsn2: 1
  Clsn2[0] = -14, -73, 33, -14
1010,1, 0,0, 5
Clsn1: 1
  Clsn1[0] = -11, -72, 42, -7
Clsn2: 1
  Clsn2[0] = -14, -73, 33, -14
1010,1, 0,0, 5
Clsn2: 1
  Clsn2[0] = -13, -75, 36, 0
1010,1, 0,0, 1
\"So you have chosen....death.\"-Saruman.

Anjel

Quote from: Bloodly on October 30, 2007, 09:46:12 AM
[State 1011, 2]
type = VelSet
trigger1 = AnimElem = 2
value = 25, -2

[State 1011, 2]
type = VelSet
trigger1 = AnimElem = 2
X = 25
Y = -2

Probably wont change anything but try it :P
My shitty mugen stuff:

DavidGee

It's true! I forgot the syntax of VelSet. Maybe in time, I could forget everything about Mugen... :'( (tears of joy)

Bloodly

Anjel cracked it.  Embarrassing, really.  I read the docs several times trying to work out what was wrong, but never did I really notice the syntax of the Vel command-possibly because in the statedef it's similar, but different(You don't have to put X = or Y =).   Maybe I thought it was 'either/or'.

Thank you to both of you.

...You'll be hearing from me concerning this character again, in time.  There are...more complicated elements in this character than what I've asked about.
\"So you have chosen....death.\"-Saruman.

Cybaster

Quote from: Bloodly on October 30, 2007, 02:09:33 PM
There are...more complicated elements in this character than what I've asked about.
Yeah, something like 5 element gems displayed as helpers all around him to help him fight. :P

Bloodly

#11
Ah, you're familiar with it.  4, actually.

The problem is compounded by the fact that not only do the gems need to:

1. be permanent unless their master dies
2. follow him properly
3. be able to move to enemies, attack(And their ways of attack are varied), then return, and
4.be hittable

...they really need to have a Defence value seperate from their master. 

The way it works is this: Golden Silver is nigh-immune to normal attacks.  It's not that they're not hitting him, but the damage is minimal.

Hit the gems, and you do normal damage.  Of course, they're a small target.

....Possible? 

With everything else, I've been able to guess, but this....The most I can figure is using negative lifeadds whenever the gems are hit-assuming hitting helpers doesn't wound the 'Master' normally.  But that could be fiddly.  Would allow me to keep beam attack from being Instant Win, though...

Ah, well.  Ponder it if you like.  At least Proto Silver(Without the gems, and normal defences-basically your standard fighter) is doable.  I'll be happy enough with that, should I manage it.  I'm pretty close now.  The real problem is what to do about lying down/falling from attack sprites-there aren't any on my sprite sheet, and those I have aren't really suitable even with cut+paste work.
\"So you have chosen....death.\"-Saruman.

Cyanide

Helpes can't subtract life from the parent, the parent would have to detect the helper state and say a variable within it getting lowered and remove life based on that.

Helpers can be hittable, no worries there. But you have them doing a heck of a lot. I suggest not starting them at all until you've got pretty much everything else under control.

QuoteAnjel cracked it.  Embarrassing, really.  I read the docs several times trying to work out what was wrong, but never did I really notice the syntax of the Vel command-possibly because in the statedef it's similar, but different(You don't have to put X = or Y .   Maybe I thought it was 'either/or'.
And not to worry there. That sort of thing is REALLY easy to miss. You'll note most of the other people missed it too. We had another one with trigger1 = 200 which noone was picking up on either.



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.

Bloodly

#13
the parent would have to detect the helper state and say a variable within it getting lowered and remove life based on that.

Detect that the thing is being hit, and drop life based on that, perhaps?

Yes, I ask a lot.  It can't be helped: accuracy is important.  G.Silver isn't G.Silver without the gems.  And I'm not willing to consider it till the rest is done: my first abortive efforts to even generate ONE gem floating above his head warned me off.(If you must know, I ended up accidently:

1. replacing Silver with the gem sprite.
2. creating a horde of Silver clones in the stand state, not doing anything.

Strange stuff.)

Anyway, a far easier, yet more important request has come up.

Art.

Simply put, the sprite sheet I'm using (http://sdb.drshnaps.com/sheets/Misc/Misc/Other/GHGoldenSilver.PNG) is somewhat incomplete, as I see it.  Most glaring is the lack of frames for Air Heavy Attacks, and his 'falling from attack/lying down' sprites.

Can you suggest or create replacements?  Without the proper frames to plug in for the required animations, the character will be permanently buggy.
\"So you have chosen....death.\"-Saruman.

Cyanide

Standing hits and lie dead can be rotated to make decent fall sprites.

Air heavy? Well you could ask in resources or do what i'd do and just reuse one of his other air attacks. No real reason you can't duplicate the animation.


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.

Bastard Mami

as a first step for sprite editing, learn franken spriting, which is basically cutting and pasting parts of sprites together. you can use the torso from a sprite of taking a hit while standing, and the legs of a jumping animation to get a get hit in the air. i  do that even for characters that have the required frames if the original frames do not look pretty to me.