Can someone tell me what the thing is call if p2 hits the wall,i made p1 did it before,i forgot what it was?
If you mean the trigger for when they hit the wall, it should be "BackEdgeBodyDist".For example, if you want something to trigger when p2 is 20 pixels (or less) away from the wall you should use: trigger1 = BackEdgeBodyDist < 20
The trigger is supposed to be inside a State (which is inside a Statedef)I suppose you want to use it on the Statedef for the attack that pushes p2 to the wall
DingusMB said, April 05, 2017, 06:57:27 pmThe trigger is supposed to be inside a State (which is inside a Statedef)I suppose you want to use it on the Statedef for the attack that pushes p2 to the walldo i have to add statedef number 13957 to it,i tried what you said but it didn't work
Javon said, April 06, 2017, 12:09:54 amDingusMB said, April 05, 2017, 06:57:27 pmThe trigger is supposed to be inside a State (which is inside a Statedef)I suppose you want to use it on the Statedef for the attack that pushes p2 to the wallhttps://www.youtube.com/edit?o=U&video_id=44KUJfxIrhs i try to get him to hit it but he fall to the ground
Hmm, the link you posted doesnt seem to work, it looks like you copied the URL to a video you were editing, not one I can watch, but I think i know what you mean.Also, sorry I meant you have to use the BackEdgeBodyDist the for "state" that pushes the p2, not the "attack". Ill post a working example and explain:The first custom state has a "aerial" type, it doesnt really change anything in this situation i think, it HAS to be "movetype = H" because its a state that he is getting hit , physics is "N" so gravity wont affect him during the state, on "anim = 201" my animation was a single frame of the sprite 5000,0 (doesnt have to be that way) [ALSO REMEMBER TO PUT HITBOXES IN THE ANIMATIONS] , VelSet is going to move him until he hits the wall , and the ChangeState is going to change his state when he is 30 pixels or less away from the wall (changing it to 202).The second custom state is the "bouncing off the wall" animation, this one has physics = S so gravity will pull him down, the "anim = 202" [DONT FORGET HITBOXES] was the same sprite as 201 (my choice of course) , Turn is going to make him change directions when he hits the wall (you dont need to use it , its optional , but if you remove it VelSet X has to be positive) , EnvShake is going to shake the screen for added effect, VelSet will move him away from the wall, and SelfState is going to put him on the default "falling" state, to avoid him getting stuck/falling through the floor (You can fix it but its a bit more complicated). You can hit him after he bounces off the wall (if you put hitboxes);--------------------------------------------------------------------------------------------;Flying towards the wall[Statedef 201]type = A movetype = H physics = N ctrl = 0anim = 201sprpriority = 2[State 0, VelSet]type = VelSettrigger1 = Time = 0x = -6y = -1ignorehitpause = 1[State 0, ChangeState]type = ChangeStatetrigger1 = BackEdgeBodyDist <= 30value = 202ctrl = 0ignorehitpause = 1;--------------------------------------------------------------------------------------------;Hitting off wall[Statedef 202]type = Amovetype = Hphysics = Sctrl = 0anim = 202sprpriority = 2[State 0, Turn]type = Turntrigger1 = Time = 0ignorehitpause = 1[State 0, EnvShake]type = EnvShaketrigger1 = Time = 0time = 20freq = 100ampl = -5ignorehitpause = 1[State 0, VelSet]type = VelSettrigger1 = Time = 0 x = -3y = -5ignorehitpause = 1[State 0, SelfState]type = SelfStatetrigger1 = Time = 0value = 5050ctrl = 0ignorehitpause = 1;--------------------------------------------------------------------------------------------
Also make sure your attack has "p2stateno =" in it, with the example it would be "p2stateno = 201" , and you can remove the "Turn" state if you want, if you hit him with the same move while he is in the air he will glitch
You can just not use "Turn", or mess with p2facing on the attack hitdef to get him to look at you when you hit himbut did the code work for you?
DingusMB said, April 07, 2017, 07:36:19 amYou can just not use "Turn", or mess with p2facing on the attack hitdef to get him to look at you when you hit himbut did the code work for you?I got the bounce off wall did,but when I put him in statedef 1263 he was glitching and flying away