Help - Search - Members - Calendar
Full Version: Please someone explain to meWHY the hell this won't work!? Please!
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
neiljwd
I had a big problem In spoilers below, that i fixed - but I don't understand HOW i fixed it. Could someone please explain?

Basically I was using a variable based off an events' X co-ordinate. Now I had a player touch event set the condition that Variable:01 was the boulder's X co-ord. However my event would just keep moving.
Eventually I tried the event that set my variables conditions as a parallel process, and it worked.
But I don't understand why? Why can't I just tell the came that I want varaible 1 to be deduced from events 1's position once? Why doesn't it need t a parallel process to keep informing it?


My original Problem

Ok, What I want is for a bridge to pop up once a boulder is in a certain position.
I've set variable one to be boulder's X(map).
I've set variable 3 to be my bridge(Event1)'s Y(map position)

And I thought to get the bridge up I had a 2 part conditional check, 1st check that the rock is in place(equal to 0) if not nothing.
But if the rocks X is 0, then it checks a second conditional, the Y(map) of itself (event 1)
If 5, it should move up 1.
Thusly after it's moved up 1, it's Y should now be 4, so it should STOP moving!
But it doesn't! It just goes to the top of the screen!
I've tried wait for move route end at every spot-makes no difference. I'm setting variable 1 and 3's conditions with a player touch event, as soon as the player moves forward.
Image below so u can see my code.


Honestly what am I doing wrong? Can anyone help please?
Moonpearl
Would you mind giving an illustration or something? Because your explanations sorta give me a headache;
neiljwd
Basically, why does a switch based on a variable, need those variables maintained in a parrarel process?
Not just an on/off status?
Penguin
I have no idea what you're asking. Are you having a problem with an event, or do you just want to know if variables require Parallel Processes to function correctly? If that's the case, they don't. You can use conditional branches instead of separate events when using variables.
Redd
If it isn't broke, don't fix it. If parallel process works for you, use it! There are a lot of things that don't work unless they are parallel process. For instance, a few event commands need to be in parallel process to work, including changing the weather. I have no clue why, but they just do. Sometimes you have put the commands in a strange/different order as well, so the game may read it differently.
MarkHest
Make sure "Repeat Movement" is unchecked in your MoveRoute event command.
Titanhex
Wouldn't this little guide help explain why it didn't work and how it fixed it?

I'm still fuzzy on your process and what you were doing, just cause it was worded awkwardly and without a demo I can't get a clear picture of what you're doing.

All I understand is that you were pushing a rock onto a switch to get a bridge to appear. Rock in place (X-Y right spot) then bridge appears.
neiljwd
Sorry everyone I was ranting probably I was furious with the problem, as I couldn't see why it wouldn't work.
Titan you've got the jist of it exactly. Just that the bridge didn't just appear, it Move forward 1 space, THEN the graphic appeared.
Only it wouldn't move 1 space, but keep moving till it met an obstacle.

Basically I'm finding variables need an active parallel process on the map to be 'in play'.
Where as switches are simply/on off.

I wouldn't of thought that would be the case, I'm probably wrong. Still very new with them after you introduced me to them, thanks. smile.gif



While I'm here can I ask, can I use a variable to say: Add 1 everytime I complete a quest.
So I set variable to be quest counter. And every time I complete a quest, my event adds +1 to the variable score. Say I do 15 maps, 1 quest per map.

Could I then say on map 16, look at that variable and will it be 'stored' as 15? or (or 13 if i only did 13)

Like say conditional
IF variable 1 =15
- Then magical quest fairy appears to congratulate you
Else
-Nothing.

I'd of thought surely I could, (in theory) but if in practice I always need a parallel process running?
Don't worry if my question is too dumb/senseless/abstract, it's just a question, not a big problem smile.gif
Titanhex
I've never understood why variables are difficult. Once you learn what they are, you'll be like "OMFG WHY DID I EVER THINK THAT VARIABLES WERE DIFFICULT?!"

Let me simplify them the best I can, so you can get started using them hassle-free.

A variable stores any number. (Numbers only, nothing else)

Using operators (+,-,=,*,etc) you can change how much a variable is. All variables start at 0. The loose definition of variable is something that changes. Variables exist to be adjusted.

And that is what a variable is. Simple as that.

Your problem isnt with understanding variables, it's with understanding the engine. Likely you need parallel process because the [actions within the event] need to be updated constantly, or at least once when the player enters the map.

It probably kept moving because of a parallel process. But I'm not sure, I don't have access to the game and cant tell. Your problem isn't with variables though, parallel process has nothing to do with variables.

So, to answer your questions:

Yes, variables can be used to add 1 to a variable every time you finish a quest. Infact, I add 1 to a variable every time I need my linear story to progress, so that I don't make a million one-way switches (they turn on but I never turn them off after doing so) and instead have 1 variable. It can also just keep track of how many quests you've done.

You're pretty much right on with what you want the variable to do. That's what most people beginning in variables use them for.
Logan110
You only need the event to be a parallel process if you have a quest that can be done on the same map. Otherwise set the event to auto run. Having too many parallel process events on 1 map tends to lag it.

Conditional branch if Variable == 15
Self Switch A on
Else
Erase Event

Then just make a new event page with self switch A having the fairy do whatever you want.
neiljwd
Some good advise there guys. Thanks. I sorta see the potential with that counting number thing. Pretty simple but massively powerfull, all NPC's with 4 pages, each one activated by the story number getting higher would mean NPC's responding to events without a bajillion switches/new maps..... very nifty.

And I think I've figured out my rant subject. it needs to be a parallel process because it's checking the position, if It's not on, it doesn't know what the position is. If it wasn't a parallel process, I could of 'put the boulder on the switch' ACTIVATE, then move it off, and it still be activated- with a parallel process the 'switch' is rechecked and switches off.

Apologies for the rambles again! Just frustration at my amateurishness coming through.
You guys helped though!

EDIT! Ahah, I have no intention of having a magical quest fairy lol! Or anything else so cutesy, was
just a simple example of how I pictured variables.

Edit 2!: I thought of another question, how do variables work with battles?
Say I had a variable based on Actors level, and when he reaches 10 he transforms, earns a new class or whatever, then would it trigger in fight, or would it just wait till I was back on a map screen?
Logan110
They wouldnt transform in battle because experience doesnt change until the end of the fight. Besides that it would totally depend on how you did the transformation. Can be done scripting or eventing. Not really sure if you wanted that explained or were more leaning to learning how variables could be used in a battle.
Titanhex
That isn't so much a question with variables as it is with conditional branches.

As you may know, a conditional branch is a series of actions that occur when a condition is true or false. Simply, do this stuff when you meet this condition.

You'd need to update the variable every time you gain a new level. After that check, you'd want to check what level you were at, cause if it's level 10, you'd want to do your transformation.

If it triggers in a fight or on map screen depends on where you're doing your conditional branch check. For all conditional branches they happen at the exact time the condition is deemed true. If in battle, the battle, if on the map, then it happens on the map, the same goes for common events.
neiljwd
Right that ties in fine with what I was thinking and how I was understanding it. Ty again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.