|
Post by mercenaryx on Jul 17, 2008 15:10:47 GMT -5
yeah, sorry, i know its annoying i keep beating this dead horse ( for once, i wish i had that emote icon of the smiley beating a dead horse) but the whole moving block incident has been solved by simply eliminating them from my dungeon altogether, it was too much to rack my brain and time troubleshooting. I simply did not see a way to get them to move with you on top of them and even if i did solve it im sure the script would be horrendously long, and waste a lot of memory. In any case, I'm still having a similar problem, and yet it cannot be solved the same way (as the elevator is part of the dungeon, the moving platforms were just ways to get to optional treasure chests to get some bonus' from inside)
i need an elevator to move up and down and bring you up to a ledge you cant otherwise reach.
I can get the elevator to move on its own rather well, and it works perfectly when you watch it in action, but then when you actually try to USE it (again, same problem as the moving blocks) it gets all screwed up and doesnt move, or doesnt move YOU, or one moves then the other moves.
Lets say this object is going to be named [Object A]
that in mind, please give me a detailed solution to this, as i cant solve it for beans.... i know its going to be complicated and probably too advanced, but from what i hear it CAN be done, and i'd like to know how.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 17, 2008 19:09:05 GMT -5
oh you meant move the block while your on top of it.
I have some ideas for that and your elevator problem
1) a repeating action script for the block event. When party and event in same x y location it sort the current direction you are facing and move. If you want it move different direction just change your own direction. In theory this should work and its not a long script at all.
repeat: game info load event info load party x = event x party y = event y apply together call: script 2 sort - party direction apply if north move block north
script 2: moves the party in the same direction. This is done so you move the party and the block at the same time.
2) I call this one the totempole. I had 3 events set to follow leader at highest speed and it somehow got to where I was standing on top of one of them, and another was standing on top of me, so 3 person totempole. The third event moves around the one at the bottom, so to move you just step on his head, then the one you were on before moves around him. When you move the event on top of your head still stays on your head.
In other words you make 2 blocks. Whichever one you are not standing on circles you, and when you move on it the other one circles you. You could make the block invisible while its circling you.
The Elevator: You need to move the party and the event at the same time. This can be done in 4 ways
1) Make the elevator a vehicle and use the float command. Set it to touch instead of equal and have a block on the ground level to bump into. Don't hide party. Use a flag or variable to determine where you are so when you get back on it you go down.
2) Make the elevator a room of its own. You can make a really professional looking one this way and the actual function of the elevator is merely scripting some warps.
3) Repeat Branch: it moves the event up 1/16 cell, then the party up 1/16 cell.
4) Script control: apply together: move the party up in one script, and the event up in another, call that script after apply together.
|
|
|
Post by Dungeon Warden on Jul 18, 2008 18:43:18 GMT -5
If you write one script that moves the player and another that moves the block and then a third script that applies them together that might work. The secret is to delay the block by a few frames (Wait 2F) so that the party is basically floating above the block as they both move up and down the elevator shaft. As long as the block and party don't touch each other until the block stops it should work fine. Use an overhead camera to hide the fact that the party is not standing on the block.
Note: if there is more then one character in the party, you might want to use the Gather command to group them together before moving them.
|
|
|
Post by mercenaryx on Jul 21, 2008 12:08:09 GMT -5
yeah i trashed the elevator altogether, it was too much of a pain in the ass to figure out, instead i replaced it with a couple staircases leading up to the platform, and then put an event staircase of the same model underneath the ground in the main room, and when the event required is activated, the staircase rises from underneath the ground, granting you access to the same area. but thanks anyways guys. oh but wouldn't you know my luck, i figured out a way to do it when i was tinkering with the scripts to make my bucket appear like its pushing down a button on the ground. i discovered if you move the 2 objects of interest 1 frame at a time, then switch to the other one, and move it one frame, then repeating the cycle, it gives the illusion that they're both moving at the same time. teedious? yes, memory killing? seems that way, but it works and the animation is beautiful. but the ways you guys have listed here.... a couple of them seem like they work a bit better and they're less memory killing, so i have a couple questions about them: this looks like basically what i just described above. the only difference is that mine is not a repeating branch. while adding like 64 extra lines of code to make this animation work for my dungeon floor switch, i couldn't help but wish that i could just make it 6 lines instead with some kind of repeating condition. But i couldn't think of a way where i could make the 2 objects move vertically at different heights per frame without individually specifying them, the screen that comes up when you try to vertically move events asks you the exact vertical positioning for your event object. meaning inputting +16 would only move the object 1 full block cell from the absolute bottom limit of the dungeon editor upwards. I couldn't figure out any variables or anything i could use to change this during some kind of loop iteration to control this process. so again: how would i make this into a repeating branch? wait wait hold on hold the damn phone... i spent a full day working on this problem, using all sorts of junk (INCLUDING apply together) as part of my trial and errors, and all this time all i had to do was call 2 scripts and have them be under [apply together] ?!?!?!? Somehow i dont think it could possibly be that simple. and even if it did work, how would i get it so that the player only gets moved upward when hes on TOP of the elevators platform, and furthermore: how would i make it so that the elevator is moving up to the top, hesitating (leaving time to unload) then proceeding to go down to the bottom floor, then hesitating again, even when the player isnt on it? and when the player DOES get on it, how would i make it appear as if the tempo of the elevators movement wasn't disturbed when the player boarded it? i'd be very interested to find out these answers, thanks in advanced.
|
|
|
Post by Dungeon Warden on Jul 21, 2008 21:26:43 GMT -5
I'm not sure you can. There are an option to make one of the vertical movement commands work based on current position instead of absolute position but I think that's in the party movement and not in event movement.
Have the event that moves the elevator check if the party moves toward it. If so, it checks the elevators height (Z axes) and if the elevator is low enough it stops the elevator.
Have the content script run when the party touches the elevator. The script will move the party onto it and then move the party and elevator up to the next level (using the method mentioned in my previous post). Since the Elevator needs to be at a certain height for this to work, there shouldn't be a noticeable delay in the movement (the elevator needs to move slowly enough that the party can get on it anyway).
The Script will move the party off the elevator before ending. Have the action script set to start moving the elevator down from it's maximum height and the elevator will continue without a noticeable delay.
I'm not sure how well this will work but it seems possible.
|
|
raithwall
RPGM2 Helper
The World I know
Posts: 222
|
Post by raithwall on Jul 24, 2008 20:35:58 GMT -5
How to make it a repeat branch:
temp variable = 0 Repeat conditon - temp variable is 64 or higher event move up 1 party move up 1 temp variable = temp variable +1 condition end
so if you want to move it 64 times you just increase the variable every time and when the variable hits 65 the branch will end. If you use another variable instead of the 64 you can make this branch for universal and apply it in many different situations.
Repeat branches are wonderful, but be very careful to do it right or the game will crash.
Do not ever set variable 86 - member number to a number higher then the total characters in your game. This, or using member info load after this, will crash the game. Its better to use the member order variable and load their info by their position in the party. This gives you the applicable member number and their info. Check the preset scripts that deal with level up after battle for an example of how this works.
EDIT: yes vertical move sets the event to an absolute position, but I have made an event and the party move using the above script, I'm not sure how at the moment, my elevator was on another gamefile I was messing around with that a friend of mine has right now.
Regardless of what I did, your best bet is method 4: move the event and the party under apply together. If you set the speeds right it should look fine.
|
|