News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

ideas?

Started by sgn15, September 04, 2011, 08:52:50 AM

Previous topic - Next topic

sgn15

I have an attack where the player moves to the corners of a screen like this
Spoiler (click to show)
the colors are indicated in which sequence they are

so the player moves in those directions (and damages obviously, if contacts enemy while moving like that) for several repetitions until the player goes directly to p2 to punch him (while on floor level already). the punch is in the finale of that super.

my idea is to use one state per movement, so that's like at least 5 states. then varadd 1 in first state so when it reaches X times of repetition, it goes to the final punch.

now i want to ask if there are better ideas, or what triggers do i use when changing states between those movements? because I tried using pos x and pos y, back/frontedgedist, back/frontedgebodydist, screenpos

what trigger is appropriate for the changestates between movement states?

edit: and yeah do i have to take into consideration also the camera movement of stages (generally speaking of course) ?

Cyanide

Not this time. You go code it and come back with what goes wrong.


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.

sgn15

Spoiler (click to show)
;---------------------------------------------------------------------------
; just preparing to attack
[Statedef 400]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 400

[State 0, SuperPause]
type = SuperPause
trigger1 = animelem = 2
time = 100
anim = -1
sound = -1
;pos =
movetime = 100
darken = 1
p2defmul = 0
poweradd = 0
unhittable = 1
;endcmdbuftime = (winmugen only)
;pausebg =  (winmugen only)
;ignorehitpause =
;persistent =

[State 0, Explod]
type = Explod
trigger1 =  animelem = 2
anim = 407
ID = 407
pos = 15,18
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 100
supermove
pausemove
scale = 1,1
sprpriority = -1
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
;ignorehitpause =
;persistent =
supermovetime = -1
pausemovetime = -1

[State 0, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 401
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 401]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 401

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 10
y = -10
;ignorehitpause =
persistent = 1


[State 0, VarAdd]
type = VarAdd
trigger1 = time = 0
v = 0
value = 1
;ignorehitpause =
;persistent =


[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
;pos
;FrontEdgeBodyDist  > 10
value = 402
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 402]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 402

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -10
y = 0
;ignorehitpause =
persistent = 1

[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
value = 403
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 403]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 403

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -10
y = 5
;ignorehitpause =
persistent = 1

[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
value = 404
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 404]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 404

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 5
y = 5
;ignorehitpause =
persistent = 1

[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
value = 405
ctrl = 1

;---------------------------------------------------------------------------
[Statedef 405]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 405

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = -10
y = 0
;ignorehitpause =
persistent = 1

[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
value = 406
ctrl = 1

;---------------------------------------------------------------------------
; FINAL PUNCH
[Statedef 406]
type    = C
movetype= A
physics = C
juggle  = 5
poweradd= 15
ctrl = 0
anim = 406

[State 0, VelSet]
type = VelSet
trigger1 = 1
x = 10
y = 0
;ignorehitpause =
persistent = 1

[State 0, 5]
type = ChangeState
trigger1 = Animtime = 0
value = 0
ctrl = 1

wait... why am i always being treated like this when I am just asking for ideas right now? I said I already coded it and I have already tried the possible triggers that i know. I already looked at triggers docs.

can someone suggest an appropriate trigger for the changestates?
for now, i put animtime = 0 just so it can run on mugen for now.

Cyanide

1: You didn't say what was going wrong
2: We don't target you. You're making a lot of topics and there is a point where we expect you to try stuff thoroughly first
3: I'm not scanning your code to work out what's wrong with it when i have no guide and don't think you've tried stuff thoroughly
4: The docs are there for a reason. Read through triggers.html, you may see something useful

I will give you ONE tip that you possibly wouldn't come up with yourself. Create a helper with a full screen width, and don't let it leave the screen with screenbound.


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.

sgn15

ok thanks. i read the docs but i did not fully understand how width works (i tried different values for edge and player). I also used screenbound repeatedly but it didnt prevent the camera from moving.

I called this helper at time=0
Spoiler (click to show)

;---------------------------------------------------------------------------
; WIDTH HELPER
[Statedef 408]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim = 408

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,0
ignorehitpause = 1
persistent = 1

[State 0, Width]
type = Width
trigger1 = 1
edge = 0,0
player = 320,320
;value =
ignorehitpause = 1
persistent = 1

help?

Cyanide

Just use value. Edge (as said in the docs) is to do with stopping the screen from moving (like the docs say) player is to do with pushing players (like in the docs)

And you want movecamera = 1,1

Quoteedge = edgewidth_front, edgewidth_back (int, int)
    Sets the player's edge width in front and behind. Edge width determines how close the player can get to the edge of the screen. These parameters default to 0,0 if omitted.


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.

sgn15

Spoiler (click to show)
;---------------------------------------------------------------------------
; WIDTH HELPER
[Statedef 406]
type    = S
movetype= A
physics = N
juggle  = 5
poweradd= 0
ctrl = 0
anim = 406
velset = 0,0

[State 0, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 1,1
ignorehitpause = 1
persistent = 1

[State 0, Width]
type = Width
trigger1 = 1
;edge = 0,0
;player = 320,320
value = 0,0
ignorehitpause = 1
persistent = 1

can you explain to me what should really happen?
from what i understand, I call this width helper that prevents the camera from moving while p1 moves around the screen?
from testing, the camera still moves when p1 moves up

Cyanide

You can't stop the camera moving up. Why have you swapped to a value of ZERO though?

See this is what i'm talking about. You have recieved advice on what to do. You've simply crammed a value in (with no thought apparently) found it didn't work and posted.

TRY AGAIN. Test it. Try different values and see what they actually do. If you don't want to edit the move each time, just create the helper and see if you can get it working on its own. It's called troubleshooting and you need to learn to do it yourself.

And you have asked enough questions over the past couple of weeks that we do expect you to be doing a bit more yourself.

Also, so you don't feel too bad. You're like rajaa was, but with better grammar.


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.

sgn15

Quote from: Cyanide on September 06, 2011, 09:48:41 AM
You can't stop the camera moving up. Why have you swapped to a value of ZERO though?

See this is what i'm talking about. You have recieved advice on what to do. You've simply crammed a value in (with no thought apparently) found it didn't work and posted.

TRY AGAIN. Test it. Try different values and see what they actually do. If you don't want to edit the move each time, just create the helper and see if you can get it working on its own. It's called troubleshooting and you need to learn to do it yourself.

And you have asked enough questions over the past couple of weeks that we do expect you to be doing a bit more yourself.

Also, so you don't feel too bad. You're like rajaa was, but with better grammar.

first of all, for the love of god, i just cant seem to always successfully go to this site for some reason (most likely my ISP), so pardon me for the very late reply

well i know what you are trying to tell me. Cyanide, but about the zero value, I have tried 0,320 and 320,0 before i tried 0,0 and 320,320 then posted the 0,0.

320,0 and 0,320 move the camera left and right. and my aim from the start was to prevent camera movement, so i changed it.

and also about movecamera = 1,1... can you tell me the reason for it? it means camera can move 1 pixel horizontally and vertically right? but i thought the aim was to prevent camera movement?

and I have already solved this problem days ago. I just cant go to this site. But i didnt used any helpers or the width sctrl at all. I just had screenbound (with 0,0 movecamera) in every movement state. then used pos y and frontedgebodydist as changestate triggers. It works like i initially wanted to be.

so with those being said, I am just clarifying on the idea you told me. I am not here to argue. I just want to learn and clarify what your idea was.