|
Post by NASH7777 on Feb 18, 2005 12:46:47 GMT -5
Yes in the indirect effect there is a spot to put a script that's used after everystep. So the script that you put in there will be the one that checks the condition and teleports or does whatever to the party.
|
|
|
Post by The Final Rune on Feb 18, 2005 12:49:14 GMT -5
Thanks a million NASH, knowing this will make my demo a lot better! Well, my fisrt shift is over, I'll be back later. Thanks again.
|
|
|
Post by NASH7777 on Feb 18, 2005 14:16:34 GMT -5
YUP
|
|
|
Post by The Final Rune on Feb 18, 2005 15:54:32 GMT -5
Ok, this has turned out to be more complicated than I thought it would. Thanks to some help from NASH I was able to get the character to warp to other maps depending on his XY coordinates. However, I’ve discovered that if you warp to a new map while on or ‘in’ a vehicle the vehicle doesn’t cross over with you, thus my dilemma. This is what I’m working with so far. Everyone please, look over my scripts and let me know if you can see a solution to my problem.
Flags: N Move – to represent movement from one map to another while traveling north. E Move – to represent movement from one map to another while traveling east. S Move – to represent movement from one map to another while traveling south. W Move – to represent movement from one map to another while traveling west. On Boat – to register boat vehicle in use at time of warp. On Airship – to register airship vehicle in use at time of warp. On Balloon – to register balloon vehicle in use at time of warp. Map Move – ON when teleporting from one world map to another, OFF upon entry. Redirect – turns ON after repositioning take place, OFF by default.
Variables: Last X – records last X coordinate to tell where to move party on X axis upon map enter. Last Y – records last Y coordinate to tell where to move party on Y axis upon map enter.
Vehicle Scripts include flags to set on/off depending on vehicle in use.
Indirect Effect Script to check party XY every step. “Check XY” (Content Script/System Event) 000: Game Info: Load 001: Data: Flag: [Redirect] OFF 002: SBC: Var: Party X <= 30 003: Data: Flag: [E Move] ON (because after warping they will appear on the east side of the map) 004: Data: Var: [Last Y] = 0 005: Data: Var: [Last Y] = [Last Y] + [Party Y] 006: Party Teleport: Warp: (Destination) X-226 / Y-127 / Z-0 007: SBC: End 008: SBC: Var: Party X >= 225 009: Data: Flag: [W Move] ON 010: Data: Var: [Last Y] = 0 011: Data: Var: [Last Y] = [Last Y] + [Party Y] 012: Party Teleport: Warp: (Destination) X-31 / Y-127 / Z-0 013: SBC: End 014: SBC: Var: Party Y <= 30 015: Data: Flag: ON 016: Data: Var: [Last X] = 0 017: Data: Var: [Last X] = [Last X] + [Party X] 018: Party Teleport: Warp: (Destination) X-127 / Y-226 / Z-0 019: SBC: End 020: SBC: Var: Party Y >= 225 021: Data: Flag: [N Move] ON 022: Data: Var: [Last X] = 0 023: Data: Var: [Last X] = [Last X] + [Party X] 024: Party Teleport: Warp: (Destination) X-127 / Y-31 / Z-0 025: SBC: End
Enter Map Script for World Maps (I redirect the character in another warp, to make it look as close as possible that you cross from one map to another in the exact spot where you left the last one) Torrant (Content Script/System Event) 000: Screen: Color: Black: 0% Trans 0F 001: SBC Flag: [Map Move] = ON 002: SBC Flag: [Redirect] = ON 003: Call Script: [Enter Map Redirect] 004: SB: Force Script End 005: SBC: End 006: SBC Flag:[W Move] = ON 007: Data: Flag: [Redirect] ON 008: Data: Var: [Last Y] = [Last Y] / 10 009: SB Sort: Var: [Last Y] 010: Apply If = 3 (less than three not possible) 011: Party Teleport: Warp (same map) X-226 / Y-31 / Z-0 012: SB: To End 013: Apply If = 4 015: Party Teleport: Warp (same map) X-226 / Y-41 / Z-0 016: SB: To End . . . . 0??: Apply If = 22 (last possible number) 0??: Party Teleport: Warp (same map) X=226 / Y-221 / Z-0 0??: SB: To End
- repeated for [N Move], [W Move], and
0??: (Normal enter map conditions here)
Enter Map Redirect (Content Script) 000: SBC: Flag: [On Boat] - Here’s where it gets tricky, I want to move the boat to the player’s position and force them aboard. Is this possible? And if it is possible I want to do it for whatever vehicle they were in when they first warped (Boat/Airship/Balloon).
|
|
|
Post by Tinbok on Feb 18, 2005 16:05:58 GMT -5
I'm not too good at coming up with scripts at the exact moment I see something. I'd have to test a few things. I'm sure I could get something working. Someone else would think of something before me though. Most likely.
|
|
|
Post by NASH7777 on Feb 18, 2005 16:23:07 GMT -5
Vehicles can in fact teleport with you to new maps. You need to set it up in the enter map script to check if your in-vehicle flag is up or whatnot.
|
|
|
Post by The Final Rune on Feb 18, 2005 16:27:21 GMT -5
Is that all there is to it! Damn! What about my scripts, do they look like they'll work properly?
|
|
|
Post by Dungeon Warden on Feb 18, 2005 22:56:21 GMT -5
If you read some on the notes in the Deploy script, you can learn a lot about vehicles and the flags that to go with them. This is where I learned what most of the Sample Flags do in the preset game.
|
|
|
Post by Doan the Nado on Feb 21, 2005 14:45:37 GMT -5
Your script looks okay to me, from what I saw. One thing I noticed is that you're kind of wasting memory with some of the commands. Instead of saying:
a = 0 a = a + b,
You can just say:
a = b + 0
I only say this because the Data commands seem to take up a good sized chunk of memory per command line (46 each, I think), so minimizing the number of these can really help your memory.
|
|
|
Post by The Final Rune on Feb 21, 2005 21:38:27 GMT -5
Thanks for the tip Doan.
|
|
|
Post by The Final Rune on Feb 25, 2005 11:40:14 GMT -5
Ok, this is not going to happen the way I want. True, you can warp while in a vehicle, sadly, there is no way to stay in the vehicle when you warp back on to a new map. I can call it to the player, but not force him aboard. I'll just have to implement something else.
|
|
|
Post by Doan the Nado on Feb 25, 2005 23:42:17 GMT -5
Seriously, there has got to be a way, or it would be really stupid indeed. Is there a preset script that is causing the player to exit the vehicle? Isn't there an "Enter Vehicle" command that could work from the Enter Map content script? There has to be something...
|
|
|
Post by The Final Rune on Mar 1, 2005 9:13:30 GMT -5
If there is a way to do this, I still haven't figured it out. I'll check to see if there is a enter vehicle script that can be utilized with the enter maps script, but I'm doubtful. I think this is simply not an option the enterbrain folks ever concieved.
|
|
|
Post by Dungeon Warden on Mar 1, 2005 16:28:16 GMT -5
It was done in Fu-Ma so it must be possible. When you first get the ship it is docked in a building, but when it sails out of the building, you can control it on the map. I suppose you can try to find the script that does this, but without names it can take a long time to find - unless it's in the enter map script for the world map.
I would think you could do it by placing the vehicle and running the vehicle script when the party enters the map. I wil definately look into this.
|
|
|
Post by The Final Rune on Mar 2, 2005 14:48:59 GMT -5
If you guys can figure this out I will eternally grateful. Of cousre implementing the script to make teleporting from map to map is a 1000+ scripting effort, but it would make the whole experience more real.
|
|
|
Post by NASH7777 on Mar 2, 2005 16:45:27 GMT -5
I belive there is a flag that does this isn't there...? I thought so, or just make your own flag, and have a defulat enter map script that puts ya ina vehicle if it's on.
|
|
|
Post by The Final Rune on Mar 2, 2005 16:54:24 GMT -5
I think I can figure it out, but I'll need to go home and find the scripts I need.
I'll let everyone know tomorrow how it goes.
|
|
|
Post by The Final Rune on Mar 3, 2005 12:56:32 GMT -5
This is where everyone gives me enormous applause for figuring this out (And this is where you kick me in the butt for not seeing it sooner)
8-)Ok, here is how you warp from map to map while in a vehicle and then reappear in that same vehicle:
You'll need a flag to turn ON when you enter a vehicle and turn OFF when you exit it.
More than one vehicle? Then set up more than one flag!
Create flags for every possible warp entry point on every map, or to make things more simple create a variable that is set to whatever # for whatever map you're going to warp to and set the number in the exit map script.
Write a deploy script that moves the vehicle to where the enter map warp point is set.
Write any standard control vehicle script.
Set up your enter map script as normal. Create a script branch condition to check if the in vehicle flag is ON. Inside that condition branch have the script call the deploy script, then do a change event control to the vehicle control event.
Rotate the event to face the same diection as the party.
And poof! Instant warp from a vehicle to a vehicle.
NOTE: This should work fine, I haven't tested it but from reading FuMa's scripts this is what I figured out. Also, this is just a bare bones how to. If you're still a complete noob at sccripting don't be afraid to ask me or any of the others for assisstance.
|
|
|
Post by Dungeon Warden on Mar 3, 2005 14:16:08 GMT -5
Yeah, that's pretty much what I was going to try. Thanks for saving me the trouble of figuring it out. I'm glad you can continue working on your game in the manner in which you invisioned it.
|
|
|
Post by NASH7777 on Mar 3, 2005 16:58:14 GMT -5
Ugh isn't that what I just said to do above.....*sigh
|
|
|
Post by The Final Rune on Mar 3, 2005 18:28:50 GMT -5
Ugh isn't that what I just said to do above.....*sigh Yeah, sort of. But my explaination is more clear and easier to understand. (since I couldn't make heads or tails of what you were talking about until I figured it out for myself)
|
|
|
Post by Doan the Nado on Mar 3, 2005 22:18:03 GMT -5
TFR's explanation was a bit more descriptive and step-by-step. Nice job on this, and I'm glad you found a solution.
|
|