Announcement

Collapse
No announcement yet.

Odio pedir ayuda, pero....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Odio pedir ayuda, pero....

    I'm trying to work on something for my game Sin and I need some help. I want to have an effect kind of like poison, except you lose health based on how long you are under that condition. For example, each second you are in a certain area you lose 1 health. In order to stop this you need to defeat enemy X or leave the area. Any ideas? Thanks!
    I had to change accounts. I'm here now - http://www.pavilionboards.com/forum/member.php?u=1475

    #2
    Re: Odio pedir ayuda, pero....

    Action Script + Member Info Load/Save FTW.

    So have a script that will load the party's X and Y and check it if you only want it in a cartain area of one dungeon, otherwise ignore this (this would be for an area effect in a larger dungeon).

    Then in all areas which will have this effect, have an action script that will Wait 30 frames, and then load each party members hp using the Data > Member Info > Load, and subtract the amount from the variable, then Data > Member Info Save. Then you can set a flag when they meet the enemy, and after they defeat it stop taking off HP.

    If you need anymore specifics let me know.
    はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
    http://www.thetruecoolness.com/

    5198-2124-7210 Smash

    Comment


      #3
      Re: Odio pedir ayuda, pero....

      That is very helpful. You are true coolness!

      I'll be trying this out later today (I need to sleep.) If I have any problems I'll ask for specifics... On second thought, specifics would be nice to have. If its no trouble that would be great. It doesn't look complicated, but I don't know when I'll be able to get back online, so I might as well ask now.
      I had to change accounts. I'm here now - http://www.pavilionboards.com/forum/member.php?u=1475

      Comment


        #4
        Re: Odio pedir ayuda, pero....

        Script Branch: Repeat [Flag(Off(Fixed))=OFF]
        Script Branch: Repeat [TempVariable9<[Number of Party Members (Don't know what variable it is)]]
        Data: Variable [TempVariable9=TempVariable9+1]
        Data: Variable [Member Order=Tempvariable9+0]
        Data: Use Member Order
        Data: Member Info Load
        Data: Variable [HP=HP-[whatever]]
        Data: Member Info Save
        Script Branch: End Repeat
        Other: Wait 30F
        Script Branch: End Repeat

        There's the specifics. It should work, but I haven't tested it.
        .

        Comment


          #5
          Re: Odio pedir ayuda, pero....

          Very nice DYRE, couldn't have said it better myself.
          Also don't forget to check to death as I forget how well RPGM2 does it on the field, I think it happens on the next step when HP is 0.

          As for the meeting the enemy and it stopping, just put another repeat after the inifinite one (Script Branch: Repeat [Flag(Off(Fixed))=OFF]) which checks to see if the metEnemy flag is off. Then if you want to do an area check (you will only be able to do squares and circles easily) load up the party's coordinates right before (Script Branch: Repeat [TempVariable9<[Number of Party Members (Don't know what variable it is)]]) using

          (for a square)
          Data: Game Info Load
          SB: Condition 82:Party X < areaStartX
          -SB: Condition 82:Party X > areaEndX
          --SB: Condition 82:Party Y < areaStartX
          ---SB: Condition 82:Party Y > areaEndX
          // insert everything in the infinite loop here
          ---SB: End
          --SB: End
          -SB: End
          SB: End

          (for a circle)
          Data: Game Info Load
          newX = 82:Party X - CircleCenterX
          xSquared = newX * newX
          newY = 82:Party Y - CircleCenterY
          ySquared = newY * newY
          xPlusY = xSquared + ySquared
          SB: Condition xPlusY < (radius * radius)
          // insert everything in the infinite loop here
          SB: End

          NOTE: All the stuff to the right of a comparison is either a number or one variable

          Of course you can do this for multiple areas on the same screen, but beware of slowdown if you do. All of this is a lot of a calculation for RPGM2 to do.
          はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
          http://www.thetruecoolness.com/

          5198-2124-7210 Smash

          Comment

          Working...
          X