Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
higgle2piggle

selfVariables and eventLabel for a conditions

Question

I've been try to do this event puzzle for almost 2 weeks now, and I just can't get the damn thing to work exactly how I want it.

 

Here is what i'm trying to do.

 

I have a floorButton in the up position. I want it to go down when a player steps on it, and then go back up when he steps of it. (I can do this fine)

Then I wanted a pushObject to be moved by the player so that the floorButton and the pushObject have the same position, thus button goes down. ( I can do this fine also)

But here is when it gets tricky.

 

I want any pushObject or the player, as there may be pushObjects 10 for example, to make the floorButton go down,.

I also want the x,y variables of the floorButton to act as a self variable. So that I define the variable once in the database, then I can copy and paste the floorButton, keeping the event as is, paste the event somewhere else and it is all set to go because its using : condition - any pushObject which is equal to self x,y variables. All I would have to do at this point is just set up the switch that is activated when floorButton is down.

The last thing that would make this amazing is this, if the pushButton has turned on the switch, then when the player exits ans enters the map the x,y co-ordinate of the pushObject remains the same as the floorButton which it is on top of.

 

Now, I am able to do every described, except for any pushObject on floorButton, without making a vegetable soup recipe of the event commands setting up every instance of a condition with individual x,y for each pushObject.

Thats why I think, if you could label an event, then use that label in the conditions, with the ability to use selfVariables for the floorButtons, it would make RMXP so much more powerful.

 

If you want a demo because its to hard to explain I can prepare one.

 

 

 

So, what i am really looking for is an event labeling system. So that I can set up the labelled event in the conditons,

For example

if pushObject 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I hope I understood what you're asking..

how about this:

suppose you have 3 pushObject events: 1,2, and 3. they're almost the same event, where you keep checking if the event is on the same x,y as the floorButton. when the event IS on top of the floorButton, make it set a certain variable: if it's the 1st pushObject, set it to 1, if it's the 2nd set it to 2, etc. then, add a page to the pushObject events, where if the 'puzzle solved' switch is ON, you automatically move the right event to be on the floorButton- if the variable is 1, the 1st pushObject will move but the others won't, etc. that way when the player re-enters the map, the pushObject is exactly where it was when he left.

Share this post


Link to post
Share on other sites
  • 0

Is this how I visualize what you are describing - basically:

 

Define Variables: 

pushObject 1 x

pushObject 1 y

 

pushObject 2 x

pushObject 2 y

 

pushObject 3 x

pushObject 3 y

 
floorButton 1 x
floorButton 1 y
 
floorButton 2 x
floorButton 2 y

 

Method: For only 1 pushObject and 1 floorObject

 

{

if (pushObject 1 x == floorButton 1 x)

     {

     if (pushObject 1 y ==  floorButton 1 y)

          ON

     else

          OFF

     }

     end

 

else

      OFF

}

end

 
 
How ill it work for more?
 
Thanks for helping btw.

Share this post


Link to post
Share on other sites
  • 0

You can use this script I'm currently working on.

 

It cannot do exactly everything you're asking for at the moment, but it definitely handles selfvariables among other things. Your issue gave me a few ideas, I'm going to add the ability for any events to test if they overlap another for instance, which means no need to manually mess with local x and y.

Share this post


Link to post
Share on other sites
  • 0

Wow, I had a look at the work you have done. It's pretty amazing. You sure know what you are doing.

Thanks. :) I like to think this project will eventually allow the eventing system to work how it should have.

 

Are you going to release it with documentation?

I might be a little lazy on documentations in a general manner. :P I plan to make a series of examples of how the system can be used, with in-game explanations and comments among the event commands, I hope this will be enough. If not I will consider writing a formal documentation. Anyways this is far from a release yet - actually I could very well release it in its current state but there are so many other tools I can add I'd rather wait for the time being.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...