Results 1 to 5 of 5
  1. #1
    hamrhed's Avatar
    Join Date
    Sep 2014
    Gender
    male
    Location
    Under your bed
    Posts
    113
    Reputation
    10
    Thanks
    30
    My Mood
    Breezy

    [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.
     
    "Life sucks, then you die, then death sucks."

  2. #2
    Fightera100's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    662
    Reputation
    10
    Thanks
    1,684
    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

  3. The Following User Says Thank You to Fightera100 For This Useful Post:

    hamrhed (08-10-2016)

  4. #3
    hamrhed's Avatar
    Join Date
    Sep 2014
    Gender
    male
    Location
    Under your bed
    Posts
    113
    Reputation
    10
    Thanks
    30
    My Mood
    Breezy
    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 @Joe
    (ps: sorry for making a ton of help posts, I can't figure things out myself cri cri)
    Last edited by hamrhed; 08-10-2016 at 02:42 PM.
     
    "Life sucks, then you die, then death sucks."

  5. #4
    Fightera100's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    662
    Reputation
    10
    Thanks
    1,684
    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")
                                )
                            ),

  6. #5
    Luis's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    2,801
    Reputation
    348
    Thanks
    1,846
    My Mood
    Psychedelic
    Everybody starts somewhere.

Similar Threads

  1. [FSOD] Ivory Dragon Behavior
    By MikeRaarupBirk in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 3
    Last Post: 10-27-2017, 02:16 AM
  2. [FSOD] Lair of Draconis [MAP][BEHAVIOR][SETPIECES]
    By HGAEHaeheadhetdhtertherh in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 38
    Last Post: 06-18-2017, 02:53 PM
  3. [FSOD] Some missing oryx mobs behaviors.
    By MikeRaarupBirk in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 3
    Last Post: 06-25-2016, 04:42 AM
  4. [FSOD] F.E.R.A.L Behaviors
    By MikeRaarupBirk in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 0
    Last Post: 06-12-2016, 04:55 AM
  5. [Help Request] [FSOD] Cave of a Thousand Treasures (Log Trap Clockwise Behavior) Need It!
    By Daemonmann in forum Realm of the Mad God Private Servers Help
    Replies: 21
    Last Post: 05-13-2016, 08:59 AM