I've got a set of characters that are all a part of a full game. They all have a variable set that when changed it causes certain effects. What I want to do is to have a move where player1 does an attack and if it successfully hits player2's variable will be modified.How do I do this?
OK, this is quite simple, you need to force P2 to adopt a custom state, the best way is using TargetState SCtrl. How to use it? Suppose that if hit, the P2 has to be in a custom state:[mcode][State 3000, P2 state]type = TargetStatetrigger1 = movehitvalue = 3001ignorehitpause = 1persistent = 0[/mcode]Now, in that 3001 state you can set P2 variables, but be carefull what are you doing, unless you are coding a complete game, this can affect vital variables used by P2, causing stange behaviors... the example can be like:[mcode][Statedef 3001]type = "Any type, can be A = Aerial, S = Standing... depends on what you want"ctrl = 0physics = "Same as above"anim = "anim you want to set for P2"[State 3001, varset]type = varsettrigger1 = time = 0var(whatever) = whatever value you want to setignorehitpause = 1persistent = 0...[/mcode]This will override P2 vars, which is rather rude (where did I have seen this before?) be carefull with this...See ya!!!!
Hey thanks a lot! By the way it is a complete game. Im not quite ready to release anything yet but I will soon.