Author Topic: the fall of one problem brings rise to another  (Read 8296 times)

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« on: 2005-07-18, 12:24:30 AM »
...two actually. well, really they dont have anything to do with previous problems, but here we go.

Problem 1) In the flying level (the forced scroll one, map 2-4Bonus...) there are little sections, each one "containing" certain sprites. Each is activated by the player hitting an invisible function (the blue boxes). However, after the player dies and goes back through the level, it almost appears that the functions arent there, because (with the exception of the initial instance enemies), all of the others are gone. Also, any function that you didn't hit before dying is still there. It's like these functions aren't resetting themselves. To see this one, from the level select (at the title screen) walk over to the one with the blue sky and clouds and jump up at it.

Problem 2) This ones quite a bit stranger. In the underwater level, with the timer, you have to get these little bottles of O2, and that adds time to your clock, and if the clock runs out, you die. simple enough. Each bottle is a tile interaction, that adds 1 second 30 times, so that it will carry over to the ten-seconds and minutes catagory, if need be. Anyway, my problem is, after the player dies (and possibly before? not sure haven't had a case like this yet) some of the bottles take time away instead of adding it. and its not always hte same bottles, and its not always a 30 second difference, sometimes its 15, sometimes its 20. It's edfinately one of the weirder ones. To see this one, from the level select (at the title screen) walk over to the underwater scene tile, with the brown fish and little green plant, and jump up at it. It's right after the first problem's tile.

------------

heres a new rar with a collection of little tweaks i've made since the other rar.
http://www.angelfire.com/ct3/billybob884/Chameleon_Man.rar
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
the fall of one problem brings rise to another
« Reply #1 on: 2005-07-18, 05:53:36 AM »
Your first problem is due to the fact that you have the functions set to be removed after first use, and functions can't be re-created by anything except script or re-loading the game.  (Alter map only copies tiles, not sprites or functions.)

Your second problem I haven't been able to reproduce.  Could you maybe provide more specific instructions on one way to reproduce it reliably?  Maybe you could use the recording and playback wizard to record a script that plays the game in a way that exhibits this problem.

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« Reply #2 on: 2005-07-18, 08:34:36 AM »
Quote from: "bluemonkmn"
Your first problem is due to the fact that you have the functions set to be removed after first use, and functions can't be re-created by anything except script or re-loading the game.  (Alter map only copies tiles, not sprites or functions.)


ok, so maybe if i set each one to be initial touch only. ok, simple enough.

Quote
Your second problem I haven't been able to reproduce.  Could you maybe provide more specific instructions on one way to reproduce it reliably?  Maybe you could use the recording and playback wizard to record a script that plays the game in a way that exhibits this problem.


like i said, this one is really weird, so try this way cuz it works for me, start the level and just follow the bottom tunnel paths, and right before you get to the tunnel that leads to the fan, the one with all of the pipes right before it, or in the tunnel itsself works too, die. then follow the same path again, but continue onwards and that o2 bottle you get in the tunnel right before the fan (u should have about 23 sec left) should take like 20 of ur time off.

whats also weirder is that it only does it after you die, and before you die it adds 40 seconds to you time, when ur only supposed to get 30.

-----------
now that i think of it, couldnt it just add like 3 "tenseconds" instead of 30 "seconds"? might be a bit simpler
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
the fall of one problem brings rise to another
« Reply #3 on: 2005-07-18, 05:08:44 PM »
Correct me if I'm wrong, but you had to use a quantity of "1" in the inventory meaning "0" in the timer in order for the digits to show up correctly, right?  Well, I think when you die as a result of running out of time, you end up with 0 minutes (which would correspond to -1 in the timer) and then when you pick up enough O2 to increase your minutes it gets increased to 0.  You need a way to keep the minutes above 0 when you die so you don't "go negative" in the timer.

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« Reply #4 on: 2005-07-18, 08:15:03 PM »
ok, so i just need a function to add one minute ot hte inventory when the player restarts after death, right? ok ill go give that a try

also, one more thing, well 2 actually, one, is there anyway to speed up transitions between maps? i've noticed their a bit slow.
and two, when you check the remember old map setting (for switch to a new map), and then return to that map, would the player (and all of the other psrites) still be in the same place, global functions still be in action, ect? becuase what im planning on doing is for hte pause having it switch to a new map 0-8Pause.map and there will be like a neat little animation or something, then when hte player hits enter, it activates a function that "returns to old".
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
the fall of one problem brings rise to another
« Reply #5 on: 2005-07-19, 06:22:16 AM »
Eureka!  I've finally discovered a non-scripted solution to switching maps faster.  Here's what you do:
1) Make sure you have at least two functions activating in the process of switching maps (for example Go5 and ToLevelSelect, like you have).
2) Make sure the background music clip is set to "Allow interrupt/restart".
3) On the first of those two functions (for example, Go5) set the media action to be "Change music" and select a very short (and optionally silent) media clip to switch to.
4) On the second of those two functions (for example ToLevelSelect), set the media action to be "play clip" and select the map's background music clip (which will now be a very short silent clip).

What happens is the second function will interrupt the slow fade-out of the background music and immediately re-start playing, but with the new short clip.  Since the short clip will finish playing before the fade-out is done, you will be able to switch maps much more quickly (as quick as your media clip is).

On your other question, yes, all the sprite positions should be remembered I think, but you might want to try a quick test before you invest too much time in it.  Just make sure the "Restart Sprites" checkbox on your "Switch to map-Retorn to old Map" function is unchecked.

I like being the bearer of good news :)

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« Reply #6 on: 2005-07-19, 09:16:16 AM »
:D  :D  :D  ok! the O2 problem is finally fixed! now, ill test your map changing solution soon too. if it works ill also be able ot use that when i switch between background musics (for hte invincibility state). oh, now that ive mentioned it, how would i go about making a background music change for a function that is activated by a collision?
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
the fall of one problem brings rise to another
« Reply #7 on: 2005-07-19, 09:46:03 AM »
Would associating the "Change background music" to a special function that is activated on collision not work?

Also, BlueMonk, why on Earth does changing the background music work that way?  I never realized before how it worked, but now that I see it, it makes me go, "huh".
Edward Dassmesser

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« Reply #8 on: 2005-07-19, 10:36:31 AM »
nah it hasent worked for me, 's why im askin

and yea, i thought it was weird that you had to specify a file for a change of background music isntead of just picking one in the media manager too.
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
the fall of one problem brings rise to another
« Reply #9 on: 2005-07-20, 05:58:17 AM »
Switching music during a sprite collision works when I try it.  As a test, I set up the player-shoe collision to switch music to the invincible music.  What happened was the invincible music faded in and then faded back to the main music because DeleteShield was activated.  I can't figure out what activated DeleteShield, but if you need help figuring that out I can look harder.  But I did hear the invincible music for a short period of time, so it works.

I am going to try to make an excuse for why the fading works the way it does.  The reason the fade function asks for a file rather than a clip is because the background music is a single clip, so that when you want to do something to the background music, you always know which clip to affect.  Fading from one sound to another is a function *within* the clip.  I think it would be more confusing if, for example, you had two different clips "LoopingA" as the background music, and "LoopingB" as a looping sound effect that was started by some function, and then you have some function that changes the background music to "LoopingB".  Now what happens if you have a function that stops "LoopingB" from playing?  There are two LoopingB clips playing somehow!  Does it stop both instances?  In the current design there is no question because you can't change one clip to another, you're just changing the file that it's playing from, but each clip can only have one instance playing at any particular time.  See?  It's almost like I thought this through! :)

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
the fall of one problem brings rise to another
« Reply #10 on: 2005-07-20, 11:51:30 AM »
Hah, almsot!  ;)  tihk i think ill do is have 2 colisionss the original plays the invincible music as if it were just a regular clip, and then another one that will change hte background music to the blank mp3 one. then ill just have to have the delete shield change the bgm back to the regular level music. il give that a shot n see if htat works
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy