Announcement

Collapse
No announcement yet.

Help with scripting would be appreciated.

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

    Help with scripting would be appreciated.

    Hi I'm fairly new to the whole Rpg Maker 2 mechanics, but one of the first things I tried to do was something I fooled around with in the first one, and Im not having success.

    I want to have an object moving back and forth along a path and when it hits your character something happens, an example warping. So that I could have traps that you have to run past.

    I can get it to go back and forth on a set path, and I can have it not stop at the character but keep going.

    What I can't do is get it to activate when it moves over the character. I thought setting it to equal would do that, but that only activates when I move the character on to the event.

    So my question is, is there a way to do this, and could I please be helped in finding out how?

    -Thanks

    #2
    Re: Help with scripting would be appreciated.

    Well you can do this with action scripts and checking the events X and Y, but getting it to do certain things will prove to be difficult. This is one of those limitation of RPGM2, and like most of them can be overcome, but this one is quite cumbersome and complicated to do. So I would suggest trying out some other things first then coming back to this issue, as it's a fairly complicated one to do. The best most people get out of this is having the event fire once the character takes a step after being in the event. Getting anything other than that will take quite a while to get right, and involve a couple of tricks in RPGM2.
    はじめまして。真(しん)の冷静(れいせい)です。どうぞよろしく。
    http://www.thetruecoolness.com/

    5198-2124-7210 Smash

    Comment


      #3
      Re: Help with scripting would be appreciated.

      Originally posted by Lunarian View Post
      Hi I'm fairly new to the whole Rpg Maker 2 mechanics, but one of the first things I tried to do was something I fooled around with in the first one, and Im not having success.

      I want to have an object moving back and forth along a path and when it hits your character something happens, an example warping. So that I could have traps that you have to run past.

      I can get it to go back and forth on a set path, and I can have it not stop at the character but keep going.

      What I can't do is get it to activate when it moves over the character. I thought setting it to equal would do that, but that only activates when I move the character on to the event.

      So my question is, is there a way to do this, and could I please be helped in finding out how?

      -Thanks

      You could always just change the actual event into an object if i'm understanding you correctly. Just change the event graphic to the model of what ever object you're wanting and put a warp script on it which activates when the character is equal to it like you suggested. There is no need to make a seperate event to move the object, just move the event itself back and forth and change the appearance of the event into the object.

      Comment


        #4
        Re: Help with scripting would be appreciated.

        Originally posted by Jeremy View Post
        You could always just change the actual event into an object if i'm understanding you correctly. Just change the event graphic to the model of what ever object you're wanting and put a warp script on it which activates when the character is equal to it like you suggested. There is no need to make a seperate event to move the object, just move the event itself back and forth and change the appearance of the event into the object.
        Thanks for trying to help me. I guess my original wording wasn't accurate enough. What you described is what I have. Having an event script that moves back and forth and using the event as the object with that movement.

        I don't know about anyone else but the movements in this game are really strange to me. When I try that setting to equal, the event only activates if the character steps directly on it at a precise section of its grid moving. If you walk through any event thats in between a grid it seem to not run.

        Comment


          #5
          Re: Help with scripting would be appreciated.

          I see. Sorry i misunderstood your post. I'm not the sharpest stick in the wood pile.

          It can be a little sticky getting a script set on equal to activate on a moving event to work. YOu have to kind of move all over the thing sometimes. I guess this is because it's difficult for the game to read when you are actually equal to a moving event. I have moving events set on my map which create monster encounters when the member is equal to them, so it can work - it's just a little slow sometimes. I wonder if maybe it's the fact your event is set as an object that might be making it worst, since members can't walk through most objects. You may want to try enabling member bypass objects and see if it works better then, or just getting rid of the event model all together to see if that's at least a part of your problem.

          If that doesn't help you any, what i would do is maybe try randomly occuring traps that fade in and out during the process of a movement script, meaning a script that is always in action - like the transition scripts for night and day. That way the event doesn't move back and forth, just appears and then dissapears, much like the day and night would - only it would be traps appearing then dissapearing rather screen effects. This may help it trigger more easily when your character moves on top of it. You would have to use a repeating script for this, but it doesn't sound too difficult. You could assign flag conditions to the events and then turn the flags on and off during the process of a repeating movement script for example, which is probably how i would go about it.
          Last edited by Jeremy; 02-25-2007, 01:27 AM.

          Comment

          Working...
          X