Author Topic: <- Nub Need Help  (Read 23180 times)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: <- Nub Need Help
« Reply #30 on: 2008-08-21, 05:53:04 PM »
If the gap is close to the same width as the sprite, the sprite will likely just glide right over the hole.  If you make the hole larger, the sprite is more likely to fall into it.
Edward Dassmesser

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #31 on: 2008-08-21, 07:51:59 PM »
ok and about the restart level transparent tile is that a good rule cuz its not working

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: <- Nub Need Help
« Reply #32 on: 2008-08-21, 07:56:43 PM »
I really don't understand what your last post was meant to say.  Can you state it more clearly?
Edward Dassmesser

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #33 on: 2008-08-21, 08:27:53 PM »
in the recently stated rule would you think that it is a rule that would be able to work? If it should work its weird cuz mine doesn't

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: <- Nub Need Help
« Reply #34 on: 2008-08-22, 05:22:24 AM »
I thought resetting a level would be relatively easy.

  • At the beginning of the level, execute a rule to save the state of the maps
IncludeInSaveUnit - SaveUnitInclusion.AllMaps
SaveGame - Slot = 1, InMemory = true

  • When the player dies, load the saved state
LoadGame - Slot = 1, InMemory = true

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: <- Nub Need Help
« Reply #35 on: 2008-08-22, 05:24:01 AM »
OMG! i made the game work thanks to you guys, i saved and exited, then i opened it up again later when i wanted to make more stuff and its back to "falling down the stairs" when i load the game, everything is still changed to how it should be running besides the sprite's solidity and when i change that i load the game and my character bursts into the air and stays there, so Tanja could you post your fixed version of my game? ty i kinda feel really stupid cuz im pretty sure this should be easy to fix

I suspect that you fixed some things, saved the project, then fixed some more and ran the project, but didn't save it.  So the compiled project worked, but after you exited and loaded the project again, some changes were lost.  I don't know how else to explain it.

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #36 on: 2008-08-22, 01:43:13 PM »
blue how do i make the player "die" do you mean when he touches the "touchable" transparent tile?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: <- Nub Need Help
« Reply #37 on: 2008-08-23, 08:12:07 PM »
Yes, that would be to make the player "die" when touching a deadly tile.

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #38 on: 2008-08-24, 03:33:43 PM »
Blue I cant get it to work,
The Transparent Tile is set in my Deadly Category,
Its On My map between  a gap
I'm able to fall into the gap and what i expected to happen ( teleport back to the beginning of the map) didnt, i fell through the gap and my sprite just sat there at the bottom of the map.

Now Im going to show you my Sprite Rules
Do - IncludeInSaveUnit - SaveUnitInclusion.AllMaps

Do - SaveGame - Slot = 1, InMemory = true

Do - TouchTiles - Category = TileCategoryName.Deadly

Do - LoadGame -Slot = 1, InMemory = True

Is there a tutorial on this? I know your busy so im sorry for asking you for so much.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: <- Nub Need Help
« Reply #39 on: 2008-08-25, 05:21:06 AM »
You shouldn't save the map when you fall through the gap, only load it.  If you save it when you fall through the gap, then loading it will, of course, put you right back in the gap.  Save should be done once when the game/map starts, then load to reset to that state when the player dies.  Also, you need to use an "if" rule to test whether one of the tiles that the player touched was deadly.  "Do" will always just do the action no matter what.

I don't think there's a tutorial for this yet, but you can look at the sample project and try to understand how its rules are working.  It doesn't demonstrate loading the game, but it does demonstrate using "If" rules and TouchTiles.

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #40 on: 2008-08-25, 11:07:40 AM »
i dont understand, my save game rules are up at the top just under move by velocity and my load game rules are 6 rules down so how is it saving when i fall through the gap?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: <- Nub Need Help
« Reply #41 on: 2008-08-25, 03:32:01 PM »
because all your asking the computer to do is

Do - IncludeInSaveUnit - SaveUnitInclusion.AllMaps

Do - SaveGame - Slot = 1, InMemory = true

Do - TouchTiles - Category = TileCategoryName.Deadly

Do - LoadGame -Slot = 1, InMemory = True

As bluemonkmn explained, when something is set as "do" the computer just does it, no questions asked. so telling the computer what to save by the look of the first rule, then its saving, then its declaring the touchtiles "deadly" category, then its gonna load. Before load, you have to put a rule, IF sprite is touching tile in category deadly, then load. (Otherwise when u start the map it will just save load save load save load save load before u can even play the game!) it has to be IF, because IF asks the computer if something is happening or not, and will only continue if it's true.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: <- Nub Need Help
« Reply #42 on: 2008-08-25, 05:22:55 PM »
The rules that you define on the sprite rules tab are rules that execute every time a sprite of that type is drawn.  So every time the player is drawn (60 times per second) it's going to save and load the game unless you have some condition that limits when to perform these actions (like a counter), and then (for example) only perform it when the counter is a specific value, and then change the counter to something different so it doesn't happen again.

blink3

  • Regular
  • **
  • Posts: 23
    • View Profile
Re: <- Nub Need Help
« Reply #43 on: 2008-08-26, 09:32:28 AM »
since im gonna try to learn as much as i can from this thread, how exactly do counters work in sprite rules.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: <- Nub Need Help
« Reply #44 on: 2008-08-26, 10:07:48 AM »
one thing i can recommend to you, start to read the help files from start to finish and then again. no joke, you can learn so much there. for example the counters. you can read how counters work, what they do and how all the functions are named and what they are for. the help will you provide much faster with information than this forum can.