Jump to content

Photo

scripted tilewarps

tilewarp ffc smb3 warp effects map

  • Please log in to reply
16 replies to this topic

#1 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 17 December 2014 - 08:30 PM

Hello, people!
Well, to my 3rd quest project, I want to simulate the super mario bros. 3 maps.
Here's a preview of my first map:

 

tar001.png

 

As you can see, the first problem is to create more than 4 tilewarps, because there are more than 4 "stage boxes" on each map screen.
So, I need a FFC that has the properties of a tilewarp like dmap and screen of destination and the warp effects.

I have a script that can be part of the solution...

ffc script FFC_Teleporter
{
    void run(int DMap, int screen){
        while(true){
            if(DistanceLink(this->X+8, this->Y+8) <= 8 && Link->PressA){
                Link->Warp(DMap, screen);
            }
        Waitframe();
        }
    }
}

... but I need some kind of warp effect without using combo warps. Has someone created something like this?

 

The other problem is the reverse warp: return from the stage to the map. I thought about using the return combo coordinates or the position of this combo. But between 2 different DMAPs I couldn't apply in the script.


Edited by accela2me, 18 December 2014 - 04:43 AM.

  • Avaro and Jared like this

#2 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 17 December 2014 - 09:29 PM

Edit3: For some reason, the entire post glitched and added a bunch of "<p>"  's to the beginning and end of every line. The latest script is in a few posts down (#11). Sorry for this horrible inconvenience D:


Edited by Arceus, 21 December 2014 - 01:05 AM.


#3 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 17 December 2014 - 09:41 PM

FastCombo only draws a combo. None of a placed combo's functionality is there. The usual way to warp Link and retain warp effects is to set this->Data to one of the auto side warp combos. You can have four side warps in addition to the four tile warps, and you can set a side warp's destination with scripts so even that limitation doesn't mean much. You're still limited to four warp return points, though. The lazy way to get around that is to just have another script at the stage exit store the coordinates you want to return to into a global variable and set Link's position to that once he returns to the map screen.



#4 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 17 December 2014 - 09:59 PM

I already did the return from level part. The entire script is untested. I also changed the drawcombo into a this->Data. Thanks!



#5 justin

justin

    Adept

  • Members

Posted 18 December 2014 - 12:45 AM

first i just gotta say that the screen is amazing!  i could barely read what you were asking because i just wanted to stare at the screen.

 

now, i think you could do it without scripting.  i'm assuming the player can only move along the pathway...  setup 3 warps that he could get to, and then have a hidden directwarp just on the path, warps player to identical screen with the next 3 warps set up.


  • Avaro likes this

#6 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 18 December 2014 - 03:33 PM

Arceus, the map teleporter works very well, but the level teleporter holds Link on the original combo.

I did a test file to show what is happening:

 

https://dl.dropboxus...porter_test.qst



#7 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 18 December 2014 - 04:10 PM

You need to set the "const int AUTOSIDEWARP = 0;" to a combo with the auto side warp combo type. Change "0" to the ID of your combo.

 

Also, I gotta say that screen and the idea is awesome! I wanted to do something like that, but never did xD Nice :)



#8 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 18 December 2014 - 04:58 PM

I've done this combo setting ;)

I think the problem is with the 2nd part of the script, which is to return to the same coordinate on the map. Link gets stuck in that combo, as if the combos around him becomes solid.

 

I'm also really enjoying doing this quest! I want to finish the first map as soon as possible, because it's a christmas present for my dad :D

The obstacle will be to create variations of the sideview stages, because I don't have many tiles available to the external scenarios (I'm taking sprites from SMB3 to complement).


Edited by accela2me, 18 December 2014 - 05:13 PM.


#9 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 18 December 2014 - 08:44 PM

Ah, sorry about that. I forgot something simple but stupid (There is a true/false statement thing that teleports link to the spot when true. I just forgot to make it so it gets set to false after). Edited the script file in my first post, it should work perfectly now :D

 

Edit: If you need help with any other scripts, just ask me! I really need more things to do DX

Is it okay with you if I were to post this in the script database?


Edited by Arceus, 18 December 2014 - 10:25 PM.


#10 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 19 December 2014 - 09:51 AM

Arceus, of course that you can post the script in the database, dude!

The problem is that I tested the script again and the return warp isn't 100% yet ^^

I noticed that the return warps created on different screens of the map position (00) will transport Link to the same coordinate of the return warp (0B, for example). Furthermore, Link is not returning to the same "stage box" coordinate on the map, but to the "blue warp square A" on the beginning of the map... and the DMAP music stops playing when Link returns to the map (weird bug).

 

 

Here is the test file with new screens:

https://dl.dropboxusercontent.com/u/86005472/FFCteleporter_test.qst

 

If we can solve this question, for sure the script can be sent to the database :)


Edited by accela2me, 19 December 2014 - 12:20 PM.


#11 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 21 December 2014 - 01:27 AM

Okay, my original post that had the script glitched and added <p>'s to the beginning and end of every line. Here is the latest script:

Spoiler

This latest version is untested, due to my previous attempts to test my scripts, but...

My solution to the problem is to freeze link for 2 seconds, ajusting his position every frame. The animations on the screen, the enemies, and ffcs will continue to run. If you need them to freeze too, I can arrange for that. My delay was caused by me trying to alter the script so as to not require StdExtra and ffcscript. It failed every time, so I edited your version wil this little fix in it too.

Completely untested, but PLEASE tell me if it works, so that I know whether to submit it or not.

If you happen to need any more scripters, just ask me :D (Actually, D:, because your scripting knowledge is better than mine D: DX)


Edit: And now I feel like a complete idiot, because I misread your problem XD

Edit2:I, for the love of god, cannot fix the music problem D: However, I did fixe the map problem. Now, if only somebody could tell my why the dmap music isn't playing... A temporary fix could be teleporting link to a screen filled with direct warps, so then  the real warp system handles it. 

Edit3: This edit might fix the music problem. Untested, as usual. I will keep the unfixed one up there, and put the fixed one down here. I also fixed the screen freeze for 2 seconds.

Spoiler

Added 2 more attribute settings, here is the full list:

 

0: Dmap of the level you wish to go to.

1: Screen of the level you wish to go to.
2: Type of warp. 0 is the cave warp type, etc... (It goes in the order listed from top to bottom in tilewarp box in Zquest)
3: Is this a return warp? 1 = true, 0 = false. If true, the only attribute you need to fill out is Type. Otherwise, fill out everything.
4: The dmap you are on (Only set for world map).

5: The screen you are on (Only set for world map).


Edited by Arceus, 22 December 2014 - 01:09 PM.


#12 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 22 December 2014 - 06:27 AM

I didn't test the new update yet, but this problem with the dmap music is very strange indeed :/



#13 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 22 December 2014 - 01:09 PM

It is very strange. One of the updates (unreleased) I made had music playing until the screen fully loaded. It would play the regular music,  then when I warped to another tilewarp again and back, it played the dungeon music. I think the dmap warping function is not working. I think that the script is not saving the dmap correctly, and I think it is saving the dmap as -1, dumping you onto map 1, which happens to be the map of the 1st dmap. If you dont mind entering the return dmap manually for each level warp, then I think that might work. Check the post above, I fixed the loading for 2 seconds problem (hopefully) and I added a version in the second spoiler that might fix the music problem. Hope this helps.



#14 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 22 December 2014 - 02:42 PM

The return warps are better now, but you've noticed that Link is sent to the "Warp Return Square A" before appearing on the stage box?

About the dmap music, I added this music script for the map, but even so the music is not played.

int filename[256];
int filename01[] = "zelda_ladx.gbs";
int filename02[] = "zelda_ooa.gbs";
int filename03[] = "zelda_oos.gbs";

ffc script EnhancedMusicPlayer
{
    void run(int filename, int track){
        if(filename == 1){
            Game->PlayEnhancedMusic(filename01, track);
        }
        if(filename == 2){
            Game->PlayEnhancedMusic(filename02, track);
        }
        if(filename == 3){
            Game->PlayEnhancedMusic(filename03, track);
        }        
    }
}

Edited by accela2me, 22 December 2014 - 02:51 PM.


#15 Deedee

Deedee

    Bug Frog Dragon Girl

  • Moderators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 22 December 2014 - 09:14 PM

The reason your music isn't playing is because you have to be on a dmap to play music. Try my second script, without any other scripts. You just have to make sure to add the Return Dmap and the Return Screen functions. It should work if you do it right. Maybe the problem is that the dmap you want to warp to cannot be 0?





Also tagged with one or more of these keywords: tilewarp, ffc, smb3, warp, effects, map

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users