HOW DO I GET HIM WHERE I WANT HIM TO GO.
Posts
Pages:
1
A bit of a pickle here.
I am building a cutscene where one of the involved characters spends the first portion of the scene chasing a squirrel in circles around a tree. That was easy to set up. Later in the scene though I want this character to stop running in circles and walk up to another character. Since they're doing circles in repeat I can't predict where they'll be exactly when the Control Switch that triggers there next movement activates. About half of the time they're where I need them to be and they wind up roughly where I want them. The other 50% of the time though, they wind up in completely the wrong spot (as exhibited in the screenshot below).
I've tried using the "Move Toward Player" command to get them going in the right direction but it still isn't working the way I want it to.
Anyone have any ideas?

I am building a cutscene where one of the involved characters spends the first portion of the scene chasing a squirrel in circles around a tree. That was easy to set up. Later in the scene though I want this character to stop running in circles and walk up to another character. Since they're doing circles in repeat I can't predict where they'll be exactly when the Control Switch that triggers there next movement activates. About half of the time they're where I need them to be and they wind up roughly where I want them. The other 50% of the time though, they wind up in completely the wrong spot (as exhibited in the screenshot below).
I've tried using the "Move Toward Player" command to get them going in the right direction but it still isn't working the way I want it to.
Anyone have any ideas?

You will have to use the control variables and assign the X and Y position of the character to one variable each. Then you use conditional branches and set move route to move him to the right spot. You can make one move route command for every possible position the character has, but I suggest you learn how to use the label commands correctly, especially if you intend to make more cut-scenes where you need to move characters who's positions are unknown.
It's hard to give you a detailed description since I don't know where things are positioned and so on, but to pull this sort of events off, you need to be a bit proficient in combining conditional branches and labels.
It's hard to give you a detailed description since I don't know where things are positioned and so on, but to pull this sort of events off, you need to be a bit proficient in combining conditional branches and labels.
Unless it's going to be a lot of trouble on your part, if I provided another pic that shows the positioning of the events could I ask for more information? Or in the least directions to a good tutorial? This is stuff I'm going to want to learn if I intend to continue with this so it might be good to push forward with it.
The lines around the tree mark the path of the squirrel and the boy. The square with the dot is where I want him to be when the control switch triggers.

The lines around the tree mark the path of the squirrel and the boy. The square with the dot is where I want him to be when the control switch triggers.
Somebody might have a better idea, but perhaps:
Does that make any sense to you in the slightest?
*Edit: I think I'm saying the exact same thing as Crystalgate?
CONTROL VARAIBLES "Event_X" = THIS EVENT Map X
CONTROL VARIABLES "Event_Y" = THIS EVENT Map Y
LOOP
CONDITIONAL BRANCH ("Event_X" = Event_Origin_X)
CONDITIONAL BRANCH ("Event_Y" = Event_Origin_Y)
COMMENT Insert a Move Event sequence here that would take the character from it's initial position
to where you want it to be.
ELSE
Wait 10 Frames
EXIT LOOP
Does that make any sense to you in the slightest?
*Edit: I think I'm saying the exact same thing as Crystalgate?
OK, let's for now ignore the fact that the squirrel can get in the way.
Start with a label and then do the control variables thing Marrend described.
Now, the positions the boy can have consists of four rows and four columns. There's a tree in the way, which complicates matter.
First, check (conditional branches) if the boy is at the bottom right corner (is X and Y position right?). If he is, then move him to the adults. If not, do the second check.
Second check, is the boy at the second lowest row? If he is, then move him one step down and then use the "Jump to Label" command. If not, then do the third check.
Third check, is the boy at the lowest row? If he is, then move him one step to the right and then use the "Jump to Label" command. If not, then do the fourth check.
Fourth check, is the boy at the rightmost column? If he is, move him one step down and then use the "Jump to Label" command. If not, move him right one step and then use the "Jump to Label" command.
What happens now is that the game will move the boy one step at a time closer to the bottom right corner and once he reaches there, it will move him to where he should be.
The last obstacle is the squirrel. It can get in the way. The easiest way to fix that is to turn through on before the boy moves. This can however lead to the boy moving trough the squirrel, which looks strange. I don't know what you want the squirrel to do once the boy moves over to the adults, but hopefully you can figure something out now.
Start with a label and then do the control variables thing Marrend described.
Now, the positions the boy can have consists of four rows and four columns. There's a tree in the way, which complicates matter.
First, check (conditional branches) if the boy is at the bottom right corner (is X and Y position right?). If he is, then move him to the adults. If not, do the second check.
Second check, is the boy at the second lowest row? If he is, then move him one step down and then use the "Jump to Label" command. If not, then do the third check.
Third check, is the boy at the lowest row? If he is, then move him one step to the right and then use the "Jump to Label" command. If not, then do the fourth check.
Fourth check, is the boy at the rightmost column? If he is, move him one step down and then use the "Jump to Label" command. If not, move him right one step and then use the "Jump to Label" command.
What happens now is that the game will move the boy one step at a time closer to the bottom right corner and once he reaches there, it will move him to where he should be.
The last obstacle is the squirrel. It can get in the way. The easiest way to fix that is to turn through on before the boy moves. This can however lead to the boy moving trough the squirrel, which looks strange. I don't know what you want the squirrel to do once the boy moves over to the adults, but hopefully you can figure something out now.
For a moment I got surprise because I think this was a couple real life problem due to the title of the topic and I was like O.O WTF, thanks god I saw the rpg map and the kiddo with a circle on him.
Thanks all for the help! I'm going to do some tinkering based on what you've given me and see how it goes! :)
author=Craze
http://forum.chaos-project.com/index.php/topic,9784.0.htmlUse a pathfinding script!
I opted to try the pathfinder script but don't quite understand what the Succes_Proc and Fail_Proc portions are. The game keeps crashing and giving me error messages related to these... am I supposed to plug in something the callback to go along with these?
Sorry for all the questions!
Have you downloaded and experimented with the demo to see how it works? I've only ever used VX pathfinding scripts, so I don't know how this script works off-hand.
author=Craze
Have you downloaded and experimented with the demo to see how it works? I've only ever used VX pathfinding scripts, so I don't know how this script works off-hand.
To hell with it. I'll try the other method...
Okay. I've tried to method suggested by Marrend and Crystalgate (I think I did at least) and I'm still running into trouble. What's happening is that now that I've set up all the conditional branches it will freeze up during playtests whenever it gets to where the branches should start working.
I've noticed that toward the bottom of the event page there's a bunch of empty conditional branches. Are those from the Loop command or something that shouldn't be present? I've tried getting rid of them but to do so I have to delete all the branches I've set up! :(
I've noticed that toward the bottom of the event page there's a bunch of empty conditional branches. Are those from the Loop command or something that shouldn't be present? I've tried getting rid of them but to do so I have to delete all the branches I've set up! :(


LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
If you don't want your conditional branches to have else conditions, uncheck the box that makes the else condition appear. When you're setting up the conditional branch I think it's a checkbox at the bottom.
Also, to make the movement actually happen right away, you have to "Proceed with movement" after setting the movement. Otherwise it will start the movement, and then let it run while the next event commands run. I would suspect that the reason it's freezing is because you have this event set as auto-start and it takes 0.0 seconds to run and then starts over.
Also this should probably all be in the same event as your cut scene, not in the boy's event. Unless a cut scene transfers the player from one map to another, there's usually not a good reason for it to be split up between multiple events.
Also, to make the movement actually happen right away, you have to "Proceed with movement" after setting the movement. Otherwise it will start the movement, and then let it run while the next event commands run. I would suspect that the reason it's freezing is because you have this event set as auto-start and it takes 0.0 seconds to run and then starts over.
Also this should probably all be in the same event as your cut scene, not in the boy's event. Unless a cut scene transfers the player from one map to another, there's usually not a good reason for it to be split up between multiple events.
I put in the seperate event because I want it to be running simultaneously with other events triggered by the same control switch. Can I put simultaneous movements in one event? I'm all for simplifying things so if that's possible I'd be all for it.
Yeah, it's possible to have everything that is associated to a cut-scene in one single event. Be prepared to test that event like crazy, though. Personally speaking, I can't count the number of times I've had to fix an event because a character's movement was off by a tile or two, or some other error. Like spelling!
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
All movements are simultaneous by default. If you want a movement to finish before the next event command starts you have to use the "Proceed with movement" event command.
Pages:
1
















