A place to have fun with Mugen
 
PortalHomeFAQMemberlistSearchRegisterComic WIP TrackerDownloadsLog inChat
Website Navigation Help
Translate the Website
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Menat Helper Ball!!
by chuchoryu Today at 7:06 pm

» 2018 ANIMATED MUNDI MAP LOCATIONS STAGES releasing...
by MatreroG Today at 6:17 pm

» New Yolomate palettes part 2, Just when you thought it was safe to go back in the forum.
by EDWARDUSK Today at 6:02 pm

» High jump remove problem
by scaricarestronzate Today at 5:57 pm

» ????????????????????????????
by yolomate Today at 5:46 pm

» 1.1 Characters and characters to 1.0
by yolomate Today at 1:10 pm

Special Features at MMV







Chat on MMV w/ Discord


Share | 
 

 Having MUGEN detect if a character is at a certain screen position?

View previous topic View next topic Go down 
AuthorMessage
Minun

avatar

Posts : 142
Join date : 2015-03-08

PostSubject: Having MUGEN detect if a character is at a certain screen position?   May 17th 2015, 8:33 am

For my game, I want characters to lose a quarter of their health when touching the edge of a stage from specific moves (Charge attacks, final smashes, and throws at certain health ratios)

I need to  have MUGEN detect for screen position on certain stages. But is there any method of doing so?
Back to top Go down
View user profile
Werewood

avatar

Posts : 5654
Join date : 2014-08-11

PostSubject: Re: Having MUGEN detect if a character is at a certain screen position?   May 19th 2015, 11:38 am

Please look at KFM's "Fast Kung Fu Palm" EX special move.

When it hits P2, it sends P2 to a custom get-hit state that makes P2 fly to the opposite wall and then bounce off.

KFM's "Fast Kung Fu Palm" [Statedef 1020]:
[State 1020, 6]
type = HitDef
...............
...............
...............
p2stateno = 1025    ;Make p2 go to state 1025 on hit
p2facing = 1        ;Force to face p1

Look at [Statedef 1025] and follow its ChangeState to [Statedef 1026]:
[State 1026, No scroll]
type = ScreenBound
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist < 65  ;;;<---------------- this is how you tell MUGEN to detect when P2 is going to the back edge of a MUGEN stage
trigger2 = FrontEdgeBodyDist < 65  ;;;<---------------- this is how you tell MUGEN to detect when P2 is going to the front edge of a MUGEN stage
value = 1
movecamera = 0,1

[State 1026, Hit wall]
type = ChangeState
triggerall = Pos y < -15
trigger1 = BackEdgeBodyDist <= 20  ;;;<---------------- this is how you tell MUGEN to detect when P2 is going to the back edge of a MUGEN stage
trigger2 = FrontEdgeBodyDist <= 20  ;;;<---------------- this is how you tell MUGEN to detect when P2 is going to the front edge of a MUGEN stage
value = 1027

Then you can use the LifeAdd state controller in [Statedef 1027] to make P2 "lose a quarter of their health":


Code:
[State 1027, LifeAdd]
type = LifeAdd
;;;triggerall = Life != 0 && Alive != 0
trigger1 = Time = 1
value = -Ceil(LifeMax / 4)
absolute = 1
persistent = 0
ignorehitpause = 1

>> I need to  have MUGEN detect for screen position on certain stages. But is there any method of doing so?
Hmmmmmmmmm.........some MUGEN triggers like ScreenPos and StageVar can do the job..... study
Back to top Go down
View user profile https://onedrive.live.com/?cid=7DB65F02B0BBD12E
 
Having MUGEN detect if a character is at a certain screen position?
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
The Mugen Multiverse :: Mugen :: Mugen Help-
Jump to: