YesNoOk
avatar

P2 Variable Trouble (Read 420 times)

Started by Liero, November 10, 2007, 01:34:34 am
Share this topic:
P2 Variable Trouble
#1  November 10, 2007, 01:34:34 am
  • **
    • http://rumblepk.tumblr.com/
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?
Re: P2 Variable Trouble
#2  November 10, 2007, 04:18:25 am
  • ***
  • Fuck Windows 8!!!! I use adult OSes to work!!!
    • Mexico
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 = TargetState
trigger1 = movehit
value = 3001
ignorehitpause = 1
persistent = 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 = 0
physics = "Same as above"
anim = "anim you want to set for P2"

[State 3001, varset]
type = varset
trigger1 = time = 0
var(whatever) = whatever value you want to set
ignorehitpause = 1
persistent = 0

...[/mcode]

This will override P2 vars, which is rather rude (where did I have seen this before?) be carefull with this...

See ya!!!! :D
This is the era in which we will see reason triumphing against brutality... May be better to open your mind to the future.
------------------------------------------------------
<- [Clicky - Clicky]
Current Universal War Official Artwork
Re: P2 Variable Trouble
#3  November 10, 2007, 04:45:21 am
  • **
    • http://rumblepk.tumblr.com/
Hey thanks a lot! 
By the way it is a complete game.  Im not quite ready to release anything yet but I will soon.