Charas-Project
Game Creation => Requests => RPG Maker Programming => Topic started by: Dele on September 28, 2007, 10:30:36 PM
-
Ok I've tried a few ways to do this event but I can't seem to figure it out.
Basically my event is this, basically I'm trying to make a chunk of ice move from one side of the lake to the other, when the hero steps on the ice, the ice carries him to the other side of the lake. The same thing happens if you step on the piece of ice from the other side too. The problem I'm having is when I walk up to the platform, I still can't walk on it, even though the event is set to below hero. Can someone help me with this please?
Also to ad to the difficulty (this is optional though) I'd like it if there was 2 chunks of ice that intersect at a point, the hero must jump to the other piece (just standard jump, just hit enter facing toward the ice to get across) Is this also possible?
Thanks. ^^b
Edit: peekture =O
-
why don't you make it so that he has a split second to 'jump' onto the Ice (By pressing Space bar) Instead of having him have to walk onto it?
-
Originally posted by Vidian
why don't you make it so that he has a split second to 'jump' onto the Ice (By pressing Space bar) Instead of having him have to walk onto it?
WTF? How's that gonna help? I tried this a while back and just gave up. You could do it so you can walk on water, then makie invisible barriers around the path that dissapear as you move along the ice. I dunno.
-
This is happening because the edge of the lake isn't passible, so you wont be able to walk onto something of the lake that is passable. To fix this, all you have to so is make a 'touch hero' event on the space before the block of ice, and have that event move your hero on the block of ice. If you want to make it a little more realistic, you can make a conditional branch inside there to only move the hero on the block of ice if you're facing the block of ice.
-
Surely that won't solve anything, DB? He wants the hero to move along automatically with the ice. I reckon it'd take coordinates. You'd have to have a thing where if the character presses right on that square, and the ice's coordinates are (x,y), then the ice sprite changed into a charset with the hero on the ice, and then it moves along and then the hero teleports tot the other side using the 'no screen transition' thing. All a little complicated but very doable.
-
You could always do DB's thing so that you can actualyl step on the platform. Then make it below hero, start: when touched.
Then just syncronize the movements of the platform and the hero to the other side byt using
Move event:
<>Move E:Platform| Left
<>Move E:Hero|Left
-ect...
Not very complicated, not even sure it'll work but it sounds reasonable.
-
Thank you for your replies, I havn't been able to work on it lately unfortunately. :( College has got me booked hard. I'll try these things and reply back in a day or two. Thanks :D
-
I GOT IT...I think
It took A LOT of work though.
First, I made 6 Events.
1> Ice Cube: Set to Below Hero, Graphic is Ice, Stationary, Parallel Process.
2> Aboard: Set to Below Hero, Graphic is Ice, Stationary, Touched by Hero.
3> Left Block: Set to Same as Hero, Graphic is blank, Stationary, Action Key.
4> Right Block: Set to Same as Hero, Graphic is blank, Stationary, Action Key.
5> Left Off: Set to Below Hero, Graphic is blank, Stationary, Touched by Hero.
6> Right Off: Set to Below Hero, Graphic is blank, Stationary, Touched by Hero.
Ok, from here, I make a chipset that has two of the same hole. One is passable, the other is not. I make a hole with the non-passable tiles, then make a straight pass with the passable blocks, but they look the same so you can't see that you can pass.
I then put the Blocks on either side of the hole above the passable path, blocking the player from crossing over the "invisible" path. I move the Left Block right one square to make that path open, and place the Aboard event on that opening. I put the Ice Cube out of the way/view. This is the "starting" position of the platform. This way if they make it to your platform before it moves, they actually start the Aboard event, and can't walk off the edge.
Ok, the Blocks have no code, and only serve to stop a player from going onto the path when the Ice Cube is away. The code for the Aboard is a simple switch activation to show the player is aboard the Ice Cube.
<>Switch Operation: [0001:Onboard] ON
The code for Right/Left Off is a switch activation to show the player is off the Ice Cube. First, the Preconditions are that the Onboard switch is ON. We don't want to change the switches if they are off already. If it was on, we turn it off, and change the direction of the Ice Cube...
<>Switch Operation: [0001:Onboard] OFF
<>Switch Operation: [0002:Move Right] OFF
<>Switch Operation: [0003:Move Left] ON
Keep in mind which side you are on.
If on the right side, you want to turn right OFF and left ON.
If on the left side, you want to turn left OFF and right ON.
Ok, from here is the hard part. The Ice Cube event has 5 pages.
1> Page 1 is to initialize the Ice Cube
Set Move Right switch to ON
Set Move Left switch to OFF
Set Onboard switch to OFF
2> Page 2 is if switch Move Right is ON
Wait: 2.0 Sec (give player time to get on)
Change Event Location of the Left Block to the spot below the right hand opening.(this is for when you are coming back from a leftward move)
Change Event Location of the Aboard event to the out of the way spot (this is for when you are coming back from a leftward move)
Change Event Location of the Ice Cube to the left opening of the path (this is for when you are coming back from a leftward move)
Move Event to move the Ice Cube Event one spot right
Wait: 0.5 Sec (if you move the Block first, the Ice Cube will get stuck on it)
Change Event Location of the Left Block to the spot the Ice Cube just moved from (now a player can't move here since the Ice Cube is away)
Wait: 0.5 Sec (This plus the other .5 = 1 sec delay, which you can change, but I thought looked nice)
Move Event to move the Ice Cube Event one spot right
Wait: 1.0 Sec
Move Event to move the Ice Cube Event one spot right
Wait: 1.0 Sec (repeat until you reach one spot from the right opening)
Change Event Location of Right Block to behind the Ice Block (so the player can't walk off the Ice Cube while boarding)
Move Event to move the Ice Cube Event one spot right (the Ice Cube is now in the final place)
Change Event Location of the Ice Cube to where the Aboard event is
Change Event Location of the Aboard to where the Ice Cube was (If player walks over this, the Aboard switch is turned on)
switch Move Left to ON
switch Move Right to OFF
3> Page 3 is the same as Page 2, but obviously in the other direction.
just Copy everything, and replace the words "right" with "left"
be sure to make the Preconditions as Move Left is ON
the Change Event Location events need to be manually set to where the events go...
4> Page 4 is moving right again, but this time you are on board, and have to have the blockers follow you so the player can't run off somewhere. Preconditions are Move Right AND Onboard
Wait: 1.0 Sec (because the player is on already)
Change Event Location of the Left Block to the spot below the right hand opening.
Change Event Location of the Aboard event to the out of the way spot
Change Event Location of the Ice Cube to the left opening of the path
Change Event Location of the Right Blocker to one space infront of the Ice Cube
Move Event to move the Ice Cube Event one spot right (now right next to the Right Blocker)
Wait: 0.5 Sec
Change Event Location of the Left Block to the spot the Ice Cube just moved from (now a player can't go backwards off the Ice Cube)
Wait: 0.5 Sec
Move Event to move the Right Blocker one spot right
Move Event to move the Ice Cube Event one spot right
Move Event to move the Hero one spot right
Move Event to move the Left Blocker one spot right
Wait: 1.0 Sec
Move Event to move the Right Blocker one spot right
Move Event to move the Ice Cube Event one spot right
Move Event to move the Hero one spot right
Move Event to move the Left Blocker one spot right
Wait: 1.0 Sec (repeat until you reach one spot from the right opening)
Change Event Location of Right Block to behind the Ice Block
Move Event to move the Ice Cube Event one spot right (the Ice Cube is now in the final place)
Move Event to move the Hero one spot right
Change Event Location of the Ice Cube to where the Aboard event is
Change Event Location of the Aboard to where the Ice Cube was
Wait: 0.5 Sec
Change Event Location of the Right Block to behind the Ice Block
Change Event Location of the Left Block to the left side opening of the hidden path
Wait: 2.0 Sec (Give player time to get off the Ice Block)
switch Move Left to ON
switch Move Right to OFF
5> Page 5 is a copy of Page 6, but again, change the Preconditions, change Left to Right and Right to Left, and manually place the Change Event Locations.
As you step off, you activate one of the Left/Right Off events which will clear the Onbaord switch, change the direction of the Ice Cube, and you are on your marry little way. If you stay on, you still change the direction of the Ice Cube by finishing the event, but the Onboard still shows you on, so you go through the moving pages again.
Notes: I did not use Trade Two Event Locations because it moved too fast and would stop my character from being able to move. Also, I used Stationary for the Movement Type (and used Move Event commands) so that I could interupt the movements, and add commands between each movement.
I figured out how to do it, but I'm bad at explaining.....hopefully you can figure out what I did with how I listed it here...Good Luck :)
Edit: In hine sight, I guess you could use 4 blockers, two that ALWAYS follow the Ice Cube wether there is someone on or not, and the other two to ALWAYS block the path. This would mean you wouldn't need and Onboard switch, nor the Aboard event. The pages would be brought down to two, but there'd be more code in each.
Also, I am finding more luck with using Move Event commands then Change Event Location commands. They are smoother, and without the Aboard event to replace the Ice Cube event, placement is irralevent.
-
Yupp, I'm pretty sure that it will work. Quite complicated bút I still think that it will work.
And welcome of course, whoever you are.
-
Wow holy crap thank you, I'm going to update this now. ^^ Thanks alot!
-
NP, I do a lot of programming, I'm new to RPG Maker, but it's a lot easier to work with the some programming I do.
Give me time and I will make it better. I just threw that together last night to try it, and after thinking about it I realize I can probibly make it smoother.
Let me work on it today and see if I can make it "look" better. No promises though ;)
-
Ok, here is a SMALL example of the moving platforms working. There are two levels. Level one is the working verion. Level two is the explanation version.
The only resource included is the edited Chipset so that it will have the invisible path.
I tweaked the code so it's only two pages. Added more events as blockers, but they have no code. Also put the moving code into one of the blockers, and made the platform the toggle switch of Onboard. It really cleaned up very nicely and it looks very smooth.
The second level has example boxes on the bottom of the screen so you can "talk" to them to see what their purpose is. Hope this helps.
MovingPlatform.jpg (http://www.geocities.com/immortaldragon25/MovingPlatform.JPG)
MovingPlatform.zip (http://www.geocities.com/immortaldragon25/MovingPlatform.zip)
PS: this is on Geocities, which has a download limit. So if you get a message of too many downloads, just try back later.