Solved[FSoD] Behavior Questions

Posts 1–5 of 5 · Page 1 of 1
[FSoD] Behavior Questions
I'd like to know if there's any clean way to transition between states. I know there's a lot of transitions, but none of them are very *clean* per-say. What I mean is that if I wanted a boss to start off with a chain-dialog of text while being invincible, I'd do something like this:
Code:
.Init("Monster",
      new State(
            new State("Idle",
                  new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                  new PlayerWithinTransition(5, "Taunt1")
            ),
            new State("Taunt1",
                  new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                  new Taunt("Text"),
                  new TimedTransition(2500, "Taunt2")
            ),
            new State("Taunt2",
                  new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                  new Taunt("Text"),
                  new TimedTransition(2500, "Taunt3")
            )
      )
);
but that wouldn't quite work. Inbetween the time the monster is changing states he stops being Invulnerable. Is there a cleaner way to transition, or is there a way to make them invulnerable until I tell it to stop being invulnerable? Thanks in advance.
put all the 3 states in a general state. Look at the avatars behaviour for that
Your code is like that:

state1
state2
state3

do it like that:

mainstate {
put invulnerable code here
state1
state2
state3
}
state4
...

Idk how to explain. I'm sure avatar has this code though
Quote Originally Posted by Fightera100 View Post
put all the 3 states in a general state. Look at the avatars behaviour for that
Your code is like that:

state1
state2
state3

do it like that:

mainstate {
put invulnerable code here
state1
state2
state3
}
state4
...

Idk how to explain. I'm sure avatar has this code though
I'll try it. Thanks for replying. I'll edit this when I've tried it.

I fixed the error I got earlier, I just needed to add a new state above the other 2. Thanks, it works ^-^.

//solved @Luis @Danny
(ps: sorry for making a ton of help posts, I can't figure things out myself cri cri)
Quote Originally Posted by hamrhed View Post
I'll try it. Thanks for replying. I'll edit this when I've tried it.

I did it, but I get an error when I add more than one state in another state.
I do something like

Code:
new State(
       new ConditionalEffect(ConditionEffectIndex.Invulnerable),
       new State("Something")
       )
new State(
       new State("SomethingElse")
       )
and the SomethingElse state will have an error that says this:

Argument 3: cannot convert from 'wServer.logic.State' to 'wServer.logic.loot.ILootDef'

Do you have a skype? So we could talk easier.
Just look at the code from avatar.

Code:
                    new State("Throwing niggos",
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new State("Niggos like dancing",
                            new Taunt("Be consumed by shadow!"),
                            new TossObject("shtrs shadowmans", 5, 0, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 45, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 90, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 135, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 180, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 225, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 270, coolDown: 100000, coolDownOffset: 1900),
                            new TossObject("shtrs shadowmans", 5, 315, coolDown: 100000, coolDownOffset: 1900),
                            new TimedTransition(4000, "kill niggos")
                            ),
                        new State("kill niggos",
                            new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                            new EntityNotExistsTransition("shtrs shadowmans", 100, "stars after niggo")
                            )
                        ),
Everybody starts somewhere.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?